code: def __respond_with_dict(self, data):
          
          response = {}
          if isinstance(data, list):
              temp_data, data = data, {}
              for key, value in enumerate(temp_data):
                  data[key] = value
  
          data.pop('seq', None)
          for index, item in data.items():
              values = item
              if isinstance(item, list) or isinstance(item, dict):
                  values = self.__respond_with_dict(item)
  
              if isinstance(values, dict) and len(values) == 1:
                  (key, values), = values.items()
              response[index] = values
  
          return response
docs: Builds a python dictionary from a json object
  
          :param data: the json object
          :returns: a nested dictionary