original_docstring: Guess any implicit ordering.
  
    The datastore gives a logical, but not necessarily predictable, ordering when
    orders are not completely explicit. This function guesses at that ordering
    (which is better then always ordering by __key__ for tests).
  
    Args:
      filters: The datastore_pb.Query_Filter that have already been normalized and
        checked.
      orders: The datastore_pb.Query_Order that have already been normalized and
        checked. Mutated in place.
    
docstring: Guess any implicit ordering.
  The datastore gives a logical, but not necessarily predictable, ordering when
  orders are not completely explicit. This function guesses at that ordering
  (which is better then always ordering by __key__ for tests).
docstring_tokens: Guess any implicit ordering . The datastore gives a logical but not necessarily predictable ordering when orders are not completely explicit . This function guesses at that ordering ( which is better then always ordering by __key__ for tests ) .
code: def _GuessOrders(filters, orders):
    """Guess any implicit ordering.
  
    The datastore gives a logical, but not necessarily predictable, ordering when
    orders are not completely explicit. This function guesses at that ordering
    (which is better then always ordering by __key__ for tests).
  
    Args:
      filters: The datastore_pb.Query_Filter that have already been normalized and
        checked.
      orders: The datastore_pb.Query_Order that have already been normalized and
        checked. Mutated in place.
    """
    orders = orders[:]
  
  
    if not orders:
      for filter_pb in filters:
        if filter_pb.op() != datastore_pb.Query_Filter.EQUAL:
  
          order = datastore_pb.Query_Order()
          order.set_property(filter_pb.property(0).name())
          orders.append(order)
          break
  
  
    exists_props = (filter_pb.property(0).name() for filter_pb in filters
                    if filter_pb.op() == datastore_pb.Query_Filter.EXISTS)
    for prop in sorted(exists_props):
      order = datastore_pb.Query_Order()
      order.set_property(prop)
      orders.append(order)
  
  
    if not orders or orders[-1].property() != '__key__':
      order = datastore_pb.Query_Order()
      order.set_property('__key__')
      orders.append(order)
    return orders
code_tokens: def _GuessOrders ( filters , orders ) : orders = orders [ : ] if not orders : for filter_pb in filters : if filter_pb . op ( ) != datastore_pb . Query_Filter . EQUAL : order = datastore_pb . Query_Order ( ) order . set_property ( filter_pb . property ( 0 ) . name ( ) ) orders . append ( order ) break exists_props = ( filter_pb . property ( 0 ) . name ( ) for filter_pb in filters if filter_pb . op ( ) == datastore_pb . Query_Filter . EXISTS ) for prop in sorted ( exists_props ) : order = datastore_pb . Query_Order ( ) order . set_property ( prop ) orders . append ( order ) if not orders or orders [ - 1 ] . property ( ) != '__key__' : order = datastore_pb . Query_Order ( ) order . set_property ( '__key__' ) orders . append ( order ) return orders
short_docstring: Guess any implicit ordering.
short_docstring_tokens: Guess any implicit ordering .
comment: """Guess any implicit ordering.
  
    The datastore gives a logical, but not necessarily predictable, ordering when
    orders are not completely explicit. This function guesses at that ordering
    (which is better then always ordering by __key__ for tests).
  
    Args:
      filters: The datastore_pb.Query_Filter that have already been normalized and
        checked.
      orders: The datastore_pb.Query_Order that have already been normalized and
        checked. Mutated in place.
    """