code: def get_input_fn_from_filespec(input_file_spec, mode, **kwargs):
      """Create a DeepVariantInput function object from a file spec.
  
      Args:
        input_file_spec: the tf.example input file specification, possibly sharded.
        mode: tf.estimator.ModeKeys.
        **kwargs: Additional keyword arguments for DeepVariantInput.
  
      Returns:
        A DeepVariantInput object usable as an input_fn.
      """
      return DeepVariantInput(
          mode=mode, input_file_spec=input_file_spec, **kwargs
      )
  
imports: import itertools
  from typing import Callable, Optional, Tuple
  from absl import logging
  import ml_collections
  import tensorflow
  from tensorflow import estimator
  from deepvariant import dv_constants
  from deepvariant import dv_utils
  from deepvariant import keras_modeling
  from deepvariant.protos import deepvariant_pb2
  from google.protobuf import text_format
  from third_party.nucleus.io import sharded_file_utils
label_desc: Use image node_id 4 for calling a global function with example usage: get_input_fn_from_filespec(input_file_spec, mode) and returns: DeepVariantInput