code: def compute_numpy_digest(features, targets=None) -> str:
      """Computes a digest for the given numpy array.
  
      Args:
          features: A numpy array containing dataset features.
          targets: A numpy array containing dataset targets. Optional.
  
      Returns:
          A string digest.
  
      """
      import numpy as np
      import pandas as pd
  
      hashable_elements = []
  
      def hash_array(array):
          flattened_array = array.flatten()
          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))
  
          # hash full array dimensions
          for x in array.shape:
              hashable_elements.append(np.int64(x))
  
      def hash_dict_of_arrays(array_dict):
          for key in sorted(array_dict.keys()):
              hash_array(array_dict[key])
  
      for item in [features, targets]:
          if item is None:
              continue
          if isinstance(item, dict):
              hash_dict_of_arrays(item)
          else:
              hash_array(item)
  
      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 2 for calling a global function with example usage: compute_numpy_digest(features, targets) and returns: get_normalized_md5_digest