code: def read_pd_file(path, file_type, **kwargs):
      import pandas as pd
  
      if file_type == "csv":
          df = pd.read_csv(path, **kwargs)
      elif file_type == "json":
          df = pd.read_json(path, **kwargs)
      else:
          invalidInputError(
              False,
              "Unsupported file type: %s. Only csv and json files are "
              "supported for now" % file_type,
          )
      return df
  
imports: from bigdl.dllib.utils.file_utils import get_file_list, callZooFunc
  from bigdl.dllib.utils.utils import convert_row_to_numpy
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.utils.log4Error import *
  import pyspark.sql.functions
  from typing import TYPE_CHECKING, Dict, List, Optional, Type, Union
  from numpy import float32, int32
label_desc: Use image node_id 14 for calling a global function with example usage: read_pd_file(path, file_type) and returns: df