code: def resolve_response_data(head_key, data_key, data):
          
          new_data = []
          if isinstance(data, list):
              for data_row in data:
                  if head_key in data_row and data_key in data_row[head_key]:
                      if isinstance(data_row[head_key][data_key], list):
                          new_data += data_row[head_key][data_key]
                      else:
                          new_data.append(data_row[head_key][data_key])
                  elif data_key in data_row:
                      return data_row[data_key]
  
          else:
              if head_key in data and data_key in data[head_key]:
                  new_data += data[head_key][data_key]
              elif data_key in data:
                      return data[data_key]
          return new_data
docs: Resolves the responses you get from billomat
          If you have done a get_one_element request then you will get a dictionary
          If you have done a get_all_elements request then you will get a list with all elements in it
  
          :param head_key: the head key e.g: CLIENTS
          :param data_key: the data key e.g: CLIENT
          :param data: the responses you got
          :return: dict or list