code: def read_tfrecord(
      format: str, path: str, *args, **kwargs
  ) -> "Dataset":
      """
      Read TFRecords files
  
      Args:
      format: String. Support "imagenet" format.
      path: String. TFRecords files path.
  
      """
      supported_format = {"imagenet"}
      if format not in supported_format:
          invalidInputError(
              False,
              format + " is not supported, should be 'imagenet'. ",
          )
  
      format_to_function = {
          "imagenet": (read_imagenet, ["is_training"])
      }
      func, required_args = format_to_function[format]
      _check_arguments(format, kwargs, required_args)
  
      kwargs["path"] = path
      return func(*args, **kwargs)
  
file_path: BigDL/python/orca/src/bigdl/orca/data/image/tfrecord_dataset.py
imports: import os
  from bigdl.orca.data.image.imagenet_dataset import *
  from bigdl.orca.data.image.parquet_dataset import _check_arguments
  from bigdl.dllib.utils.log4Error import invalidInputError
  from typing import TYPE_CHECKING, List
label_desc: Use image node_id 5 for calling a global function with example usage: read_tfrecord(format, path) and returns: func