code: def get_engine(engine: str) -> BaseImpl:
      """return our implementation"""
      if engine == "auto":
          engine = get_option("io.parquet.engine")
  
      if engine == "auto":
          # try engines in this order
          engine_classes = [PyArrowImpl, FastParquetImpl]
  
          error_msgs = ""
          for engine_class in engine_classes:
              try:
                  return engine_class()
              except ImportError as err:
                  error_msgs += "\n - " + str(err)
  
          raise ImportError(
              "Unable to find a usable engine; "
              "tried using: 'pyarrow', 'fastparquet'.\n"
              "A suitable version of "
              "pyarrow or fastparquet is required for parquet "
              "support.\n"
              "Trying to import the above resulted in these errors:"
              f"{error_msgs}"
          )
  
      if engine == "pyarrow":
          return PyArrowImpl()
      elif engine == "fastparquet":
          return FastParquetImpl()
  
      raise ValueError("engine must be one of 'pyarrow', 'fastparquet'")
  
imports: from __future__ import annotations
  import io
  import os
  from typing import Any, Literal
  import warnings
  from warnings import catch_warnings
  from pandas._libs import lib
  from pandas._typing import DtypeBackend, FilePath, ReadBuffer, StorageOptions, WriteBuffer
  from pandas.compat._optional import import_optional_dependency
  from pandas.errors import AbstractMethodError
  from pandas.util._decorators import doc
  from pandas.util._exceptions import find_stack_level
  from pandas.util._validators import check_dtype_backend
  import pandas
  from pandas import DataFrame, get_option
  from pandas.core.shared_docs import _shared_docs
  from pandas.util.version import Version
  from pandas.io.common import IOHandles, get_handle, is_fsspec_url, is_url, stringify_path
label_desc: Use image node_id 1 for calling a global function with example usage: get_engine(engine) and returns: PyArrowImpl, FastParquetImpl, engine_class