nodes: 0, module; 1, function_definition; 2, function_name:near; 3, parameters; 4, block; 5, identifier:cls; 6, identifier:collection; 7, identifier:latitude; 8, identifier:longitude; 9, identifier:index_id; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, expression_statement; 14, expression_statement; 15, return_statement; 16, identifier:distance; 17, None; 18, identifier:skip; 19, None; 20, identifier:limit; 21, None; 22, comment:"""
              The default will find at most 100 documents near the given coordinate.
              The returned list is sorted according to the distance, with the nearest document being first in the list.
              If there are near documents of equal distance, documents are chosen randomly from this set until
              the limit is reached.
  
              In order to use the near operator, a geo index must be defined for the collection.
              This index also defines which attribute holds the coordinates for the document.
              If you have more then one geo-spatial index, you can use the geo field to select a particular index.
  
              :param collection Collection instance
              :param latitude The latitude of the coordinate
              :param longitude The longitude of the coordinate
              :param index_id ID of the index which should be used for the query
  
              :param distance If given, the attribute key used to return the distance to the given coordinate.
              If specified, distances are returned in meters.
  
              :param skip  The number of documents to skip in the query
              :param limit The maximal amount of documents to return. The skip is applied before the limit restriction.
  
              :returns Document list
          """; 23, assignment; 24, call; 25, identifier:kwargs; 26, dictionary; 27, attribute; 28, argument_list; 29, pair; 30, pair; 31, pair; 32, pair; 33, pair; 34, pair; 35, identifier:cls; 36, identifier:_construct_query; 37, keyword_argument; 38, keyword_argument; 39, keyword_argument; 40, dictionary_splat; 41, string; 42, identifier:index_id; 43, string; 44, identifier:latitude; 45, string; 46, identifier:longitude; 47, string; 48, identifier:distance; 49, string; 50, identifier:skip; 51, string; 52, identifier:limit; 53, identifier:name; 54, string; 55, identifier:collection; 56, identifier:collection; 57, identifier:multiple; 58, True; 59, identifier:kwargs; 60, string_content:geo; 61, string_content:latitude; 62, string_content:longitude; 63, string_content:distance; 64, string_content:skip; 65, string_content:limit; 66, string_content:near
code: def near(cls, collection, latitude, longitude, index_id, distance=None, skip=None, limit=None):
          """
              The default will find at most 100 documents near the given coordinate.
              The returned list is sorted according to the distance, with the nearest document being first in the list.
              If there are near documents of equal distance, documents are chosen randomly from this set until
              the limit is reached.
  
              In order to use the near operator, a geo index must be defined for the collection.
              This index also defines which attribute holds the coordinates for the document.
              If you have more then one geo-spatial index, you can use the geo field to select a particular index.
  
              :param collection Collection instance
              :param latitude The latitude of the coordinate
              :param longitude The longitude of the coordinate
              :param index_id ID of the index which should be used for the query
  
              :param distance If given, the attribute key used to return the distance to the given coordinate.
              If specified, distances are returned in meters.
  
              :param skip  The number of documents to skip in the query
              :param limit The maximal amount of documents to return. The skip is applied before the limit restriction.
  
              :returns Document list
          """
  
          kwargs = {
              'geo': index_id,
              'latitude': latitude,
              'longitude': longitude,
              'distance': distance,
              'skip': skip,
              'limit': limit,
          }
  
          return cls._construct_query(name='near',
                                      collection=collection, multiple=True,
                                      **kwargs)