code: def format_status_json(self):
          
          status_json = {}
  
          status_json['code'] = self.code
          status_json['message'] = self.message
  
          if self.details is not None:
              status_json['details'] = self.details
  
          return status_json
docs: Convert a Status object to json format.