in src/functions_framework/_typed_event.py [0:0]
def _validate_return_type(response):
if not (hasattr(response, "to_dict") and callable(getattr(response, "to_dict"))):
raise AttributeError(
"The type {response} does not have the required method called "
" 'to_dict'.".format(response=type(response))
)