code: def _read_file_type(filepath, **kwargs):
      """Read the file based on file extension.
  
      Currently supports the following filetypes:
          csv, json, txt, shp
  
      Args:
          filepath: The filepath to open
          **kwargs: Keyword arguments to pass to the reader
  
      Returns:
          A Pandas data frame
      """
      extension = os.path.splitext(filepath)[1]
      if is_filetype(_FileExtensionTypes.CSV, extension):
          return pd.read_csv(filepath, **kwargs)
      elif is_filetype(_FileExtensionTypes.JSON, extension):
          lines = kwargs.pop("lines", True)
          return pd.read_json(filepath, lines=lines, **kwargs)
      elif is_filetype(_FileExtensionTypes.EXCEL, extension):
          return pd.read_excel(filepath, **kwargs)
      else:
          sep = kwargs.pop("sep", "\n")
          return pd.read_csv(filepath, sep=sep, **kwargs)
  
imports: import os
  import tempfile
  import pandas
  from data_describe.compat import _compat, _requires
  from data_describe.misc.file_ext import _FileExtensionTypes, is_filetype
label_desc: Use image node_id 2 for calling a global function with example usage: _read_file_type(filepath) and returns: pd, pd, pd, pd