code: def dict_camel_to_snake_case(camel_dict, convert_keys=True, convert_subkeys=False):
      
  
      converted = {}
      for key, value in camel_dict.items():
          if isinstance(value, dict):
              new_value = dict_camel_to_snake_case(value, convert_keys=convert_subkeys,
                                                   convert_subkeys=True)
          elif isinstance(value, list):
              new_value = []
              for subvalue in value:
                  new_subvalue = dict_camel_to_snake_case(subvalue, convert_keys=convert_subkeys,
                                                          convert_subkeys=True) \
                      if isinstance(subvalue, dict) else subvalue
                  new_value.append(new_subvalue)
          else:
              new_value = value
          new_key = to_snake_case(key) if convert_keys else key
          converted[new_key] = new_value
      return converted
docs: Recursively convert camelCased keys for a camelCased dict into snake_cased keys
  
      :param camel_dict: Dictionary to convert
      :param convert_keys: Whether the key should be converted
      :param convert_subkeys: Whether to also convert the subkeys, in case they are named properties of the dict
      :return: