code: def sort(cls, dataset, by=None, reverse=False):
      if by is None:
          by = []
      cols = [dataset.get_dimension(d, strict=True).name for d in by]
  
      if not isinstance(
          dataset.data, pd.DataFrame
      ) or util.pandas_version < Version("0.17.0"):
          return dataset.data.sort(columns=cols, ascending=not reverse)
      return dataset.data.sort_values(by=cols, ascending=not reverse)
  
imports: import numpy
  import pandas
  from packaging.version import Version
  from pandas.api.types import is_numeric_dtype
  from ..None import util
  from ..dimension import Dimension, dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
  from .util import finite_range
label_desc: Use image node_id 14 for calling the PandasInterface obj's underlying member method code with example usage: obj.sort(cls, dataset, by, reverse) and returns: dataset, dataset