import inspect


def GetDatasets(cls):
  """Returns the list of dataset functions (e.g. Train, Dev, ...)."""
  datasets = []
  for name, _ in inspect.getmembers(
      cls, lambda x: inspect.isfunction(x) or inspect.ismethod(x)):
    if name not in ['GetDatasetParams', 'Model', 'Task', 'ProgramSchedule'
                   ] and not name.startswith('_'):
      datasets += [name]
  return datasets