code: def compute_tensorflow_dataset_digest(dataset, targets=None) -> str:
      """Computes a digest for the given Tensorflow dataset.
  
      Args:
          dataset: A Tensorflow dataset.
  
      Returns:
          A string digest.
  
      """
      import numpy as np
      import pandas as pd
      import tensorflow as tf
  
      hashable_elements = []
  
      def hash_tf_dataset_iterator_element(element):
          if element is None:
              return
          flat_element = tf.nest.flatten(element)
          flattened_array = np.concatenate(
              [x.flatten() for x in flat_element]
          )
          trimmed_array = flattened_array[0:MAX_ROWS]
          try:
              hashable_elements.append(
                  pd.util.hash_array(trimmed_array)
              )
          except TypeError:
              hashable_elements.append(np.int64(trimmed_array.size))
  
      for element in dataset.as_numpy_iterator():
          hash_tf_dataset_iterator_element(element)
      if targets is not None:
          for element in targets.as_numpy_iterator():
              hash_tf_dataset_iterator_element(element)
  
      return get_normalized_md5_digest(hashable_elements)
  
file_path: mlflow/mlflow/data/digest_utils.py
imports: from typing import Any, List
  from packaging.version import Version
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.utils import insecure_hash
label_desc: Use image node_id 3 for calling a global function with example usage: compute_tensorflow_dataset_digest(dataset, targets) and returns: get_normalized_md5_digest