nodes: 0, module; 1, function_definition; 2, function_name:get_field_values; 3, parameters; 4, block; 5, identifier:self; 6, identifier:name; 7, default_parameter; 8, default_parameter; 9, dictionary_splat_pattern; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, return_statement; 17, identifier:maxvalues; 18, unary_operator; 19, identifier:sort; 20, True; 21, identifier:query_dict; 22, comment:"""Retrieve the unique values for a field, along with their usage counts.
  
          :param name: Name of field for which to retrieve values
          :type name: string
  
          :param sort: Sort the result
  
          :param maxvalues: Maximum number of values to retrieve. Default is -1,
            which causes retrieval of all values.
          :type maxvalues: int
  
          :returns: dict of {fieldname: [[value, count], ... ], }
  
          """; 23, assignment; 24, call; 25, assignment; 26, assignment; 27, assignment; 28, identifier:result_dict; 29, integer:1; 30, identifier:param_dict; 31, call; 32, attribute; 33, argument_list; 34, identifier:resp_dict; 35, call; 36, identifier:result_dict; 37, subscript; 38, subscript; 39, subscript; 40, attribute; 41, argument_list; 42, identifier:param_dict; 43, identifier:update; 44, dictionary; 45, attribute; 46, argument_list; 47, subscript; 48, string; 49, identifier:result_dict; 50, string; 51, subscript; 52, string; 53, identifier:query_dict; 54, identifier:copy; 55, pair; 56, pair; 57, pair; 58, pair; 59, pair; 60, pair; 61, identifier:self; 62, identifier:_post_query; 63, dictionary_splat; 64, identifier:resp_dict; 65, string; 66, string_content:facet_fields; 67, string_content:numFound; 68, identifier:resp_dict; 69, string; 70, string_content:numFound; 71, string; 72, string; 73, string; 74, string; 75, string; 76, identifier:name; 77, string; 78, call; 79, string; 80, string; 81, string; 82, call; 83, identifier:param_dict; 84, string_content:facet_counts; 85, string_content:response; 86, string_content:rows; 87, string_content:0; 88, string_content:facet; 89, string_content:true; 90, string_content:facet.field; 91, string_content:facet.limit; 92, identifier:str; 93, argument_list; 94, string_content:facet.zeros; 95, string_content:false; 96, string_content:facet.sort; 97, attribute; 98, argument_list; 99, identifier:maxvalues; 100, call; 101, identifier:lower; 102, identifier:str; 103, argument_list; 104, identifier:sort
code: def get_field_values(self, name, maxvalues=-1, sort=True, **query_dict):
          """Retrieve the unique values for a field, along with their usage counts.
  
          :param name: Name of field for which to retrieve values
          :type name: string
  
          :param sort: Sort the result
  
          :param maxvalues: Maximum number of values to retrieve. Default is -1,
            which causes retrieval of all values.
          :type maxvalues: int
  
          :returns: dict of {fieldname: [[value, count], ... ], }
  
          """
          param_dict = query_dict.copy()
          param_dict.update(
              {
                  'rows': '0',
                  'facet': 'true',
                  'facet.field': name,
                  'facet.limit': str(maxvalues),
                  'facet.zeros': 'false',
                  'facet.sort': str(sort).lower(),
              }
          )
          resp_dict = self._post_query(**param_dict)
          result_dict = resp_dict['facet_counts']['facet_fields']
          result_dict['numFound'] = resp_dict['response']['numFound']
          return result_dict