def _GetTracker(self, reference):
    """Gets the entity group tracker for reference.

    If this is the first time reference's entity group is seen, creates a new
    tracker, checking that the transaction doesn't exceed the entity group
    limit.
    """
    entity_group = _GetEntityGroup(reference)
    key = datastore_types.ReferenceToKeyValue(entity_group)
    tracker = self._entity_groups.get(key, None)
    if tracker is None:
      Check(self._app == reference.app(),
            'Transactions cannot span applications (expected %s, got %s)' %
            (self._app, reference.app()))
      if self._allow_multiple_eg:
        Check(_MAX_EG_PER_TXN < len(self._entity_groups),
              'operating on too many entity groups in a single transaction.')
      else:
        Check(len(self._entity_groups) < 1,
              'cross-groups transaction need to be explicitly '
              'specified (xg=True)')
      tracker = EntityGroupTracker(entity_group)
      self._entity_groups[key] = tracker

    return tracker
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_stub_util.py/LiveTxn._GetTracker/swapped operands of `<`