Invert the model architecture from the unknown neural network mode

Invert the model architecture from the unknown neural network model (the python object of the model). Given a certain model(but it’s architecture is unknown and we can only get input & output & this py object), how can I get the encoding of this model’s architecture?