code: def meta_request(func):
      
      def inner(self, resource, *args, **kwargs):
          serialize_response = kwargs.pop('serialize', True)
          try:
              resp = func(self, resource, *args, **kwargs)
          except ApiException as e:
              raise api_exception(e)
          if serialize_response:
              return serialize(resource, resp)
          return resp
  
      return inner
docs: Handles parsing response structure and translating API Exceptions