code: def sort(self, key_or_list, direction=None):
          self.__check_okay_to_chain()
          keys = helpers._index_list(key_or_list, direction)
          self.__ordering = helpers._index_document(keys)
          return self