code: def auto_dataset(data_input=None, task="UT"):
      r"""
      Create Dataset instance and load data input automatically.
  
      :param dict|list|string data_input: json object or json/csv file.
      :param str task: task name.
      :return: textflint.Dataset instance.
  
      """
  
      def split_huggingface_data_str(data_str):
          raise NotImplementedError
  
      if not isinstance(data_input, (list, dict, str)):
          raise ValueError(
              "Please pass a dataset dic, or local csv path, "
              "or HuggingFace data str, your input is {0}".format(
                  data_input
              )
          )
      dataset_obj = Dataset(task=task)
  
      if isinstance(data_input, (list, dict)):
          dataset_obj.load(data_input)
      else:
          if os.path.exists(data_input):
              if ".csv" in data_input:
                  dataset_obj.load_csv(csv_path=data_input)
              elif ".json" in data_input:
                  dataset_obj.load_json(json_path=data_input)
              else:
                  raise ValueError(
                      "Not support load {0}, please ensure "
                      "your input file end with '.csv' "
                      "or '.json'".format(data_input)
                  )
          else:
              raise ValueError(
                  "Just support load json object, "
                  "csv file and json file, error input {0}".format(
                      data_input
                  )
              )
  
      return dataset_obj
  
file_path: textflint/textflint/adapter.py
imports: import os
  from .input.config import Config
  from .common import logger
  from .input.dataset import Dataset
  from .input.model import FlintModel
  from .common.utils import task_class_load
  from .common.utils.load import load_module_from_file
  from .generation.generator import Generator, UTGenerator
  from .common.settings import GENERATOR_PATH, NLP_TASK_MAP
  from .report.report_generator import ReportGenerator
label_desc: Use image node_id 3 for calling a global function with example usage: auto_dataset(data_input, task) and returns: dataset_obj