docs: def return_data(self, data, format=None):
          """Format and return data appropriate to the requested API format.
  
          data: The data retured by the api request
  
          """
          if format is None:
              format = self.format
          if format == "json":
              formatted_data = json.loads(data)
          else:
              formatted_data = data
          return formatted_data