code: def check_engine(engine):
      if engine == "auto":
          if pa is not None:
              return "pyarrow"
          elif fastparquet is not None:  # pragma: no cover
              return "fastparquet"
          else:  # pragma: no cover
              raise RuntimeError(
                  "Please install either pyarrow or fastparquet."
              )
      elif engine == "pyarrow":
          if pa is None:  # pragma: no cover
              raise RuntimeError("Please install pyarrow first.")
          return engine
      elif engine == "fastparquet":
          if fastparquet is None:  # pragma: no cover
              raise RuntimeError("Please install fastparquet first.")
          return engine
      else:  # pragma: no cover
          raise RuntimeError(
              "Unsupported engine {} to read parquet.".format(engine)
          )
  
imports: import os
  from typing import Dict
  from urllib.parse import urlparse
  import numpy
  import pandas
  from ...None import opcodes
  from ...config import options
  from ...lib.filesystem import file_size, get_fs, glob, open_file, FileSystem
  from ...serialization.serializables import AnyField, BoolField, DictField, ListField, StringField, Int32Field, Int64Field
  from ...utils import is_object_dtype, lazy_import
  from ..arrays import ArrowStringDtype
  from ..operands import OutputType
  from ..utils import parse_index, to_arrow_dtypes, contain_arrow_dtype
  from .core import IncrementalIndexDatasource, ColumnPruneSupportedDataSourceMixin, IncrementalIndexDataSourceMixin, merge_small_files
label_desc: Use image node_id 1 for calling a global function with example usage: check_engine(engine) and returns: str, engine, str, engine