How to refactor similar functions in Python?
I have defined multiple functions where I search for a specific pydantic model in a list of pydantic models based on some attribute value.
I have defined multiple functions where I search for a specific pydantic model in a list of pydantic models based on some attribute value.