def _SetOrder(self, value):
    if self._query_final is not None:
      raise AttributeError('Can\'t set order. Query info is final.')

    if self._order is not None:
      raise AttributeError('Order can\'t be set twice.')

    if value is None:
      return
    elif not isinstance(value, basestring):
      raise TypeError('Order must be a string.')

    self._order = value
    self._SetOrderAttrs()
Returns the lock used for this Bunch.  USE WITH EXTREME CAUTION!
dataset/ETHPy150Open GoogleDeveloperExperts/experts-app-backend/endpoints_proto_datastore/ndb/model.py/_EndpointsQueryInfo._SetOrder--crossover with--dataset/ETHPy150Open ejeschke/ginga/ginga/misc/Bunch.py/threadSafeBunch.getlock