code: def read_dataset_config(dataset_config_filename):
      """Returns a DeepVariantDatasetConfig proto read from the dataset config file.
  
      Args:
        dataset_config_filename: String. Path to the dataset config pbtxt file.
  
      Returns:
        A DeepVariantDatasetConfig proto from the dataset_config file.
  
      Raises:
        ValueError: if the dataset config doesn't have the necessary information.
      """
      with tf.io.gfile.GFile(dataset_config_filename) as f:
          dataset_config = text_format.Parse(
              f.read(), deepvariant_pb2.DeepVariantDatasetConfig()
          )
  
      if not dataset_config.name:
          raise ValueError("dataset_config needs to have a name")
  
      if not dataset_config.tfrecord_path:
          raise ValueError(
              "The dataset in the config {} does not have a tfrecord_path.".format(
                  dataset_config_filename
              )
          )
  
      # TODO: remove this check once we're able to deal with absence
      # of num_examples.
      if not dataset_config.num_examples:
          raise ValueError(
              "The dataset in the config {} does not have a num_examples.".format(
                  dataset_config_filename
              )
          )
  
      return dataset_config
  
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 6 for calling a global function with example usage: read_dataset_config(dataset_config_filename) and returns: dataset_config