code: def sort(cls, dataset, by=None, reverse=False):
      if by is None:
          by = []
      data = dataset.data
      if len(by) == 1:
          sorting = cls.values(dataset, by[0]).argsort()
      else:
          dtypes = [
              (d.name, dataset.data.dtype) for d in dataset.dimensions()
          ]
          sort_fields = tuple(dataset.get_dimension(d).name for d in by)
          sorting = dataset.data.view(dtypes, np.recarray).T
          sorting = sorting.argsort(order=sort_fields)[0]
      sorted_data = data[sorting]
      return sorted_data[::-1] if reverse else sorted_data
  
imports: import numpy
  from ..None import util
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
label_desc: Use image node_id 8 for calling the ArrayInterface obj's underlying member method code with example usage: obj.sort(cls, dataset, by, reverse) and returns: unknown