Create a partial model definition of a pydantic model

Sometimes I want to create a partial model definition of a pydantic model. For example, if I want to expose a database model from API, some of the fields I would like to keep in secret, or I just want to expose very few fields in a summary API. I don't want to write model definition twice. I would like to write something like 1 ModelExposed = partial_model(ModelSource, 'ModelExposed',…