in src/cloudformation_cli_python_lib/utils.py [0:0]
def serialize(self) -> Mapping[str, Any]:
return {
key: value.__dict__.copy() if key.endswith("Credentials") else value
for key, value in self.__dict__.items()
if value is not None
}