code: def _find_label_domain(
      eval_config: config_pb2.EvalConfig,
      schema: schema_pb2.Schema,
      model_name: str,
      output_name: str,
  ) -> Tuple[Optional[Union[int, float]], Optional[Union[int, float]]]:
      """Find the min and max value for the label_key for this model / output."""
      model_spec = model_util.get_model_spec(eval_config, model_name)
      if not model_spec:
          return None, None
      label_key = model_util.get_label_key(model_spec, output_name)
      if not label_key:
          return None, None
      label_schema = None
      for feature_schema in schema.feature:
          if feature_schema.name == label_key:
              label_schema = feature_schema
              break
      if label_schema is None:
          return None, None
  
      # Find the domain
      if label_schema.HasField("int_domain"):
          label_domain = label_schema.int_domain
      elif label_schema.HasField("float_domain"):
          label_domain = label_schema.float_domain
      else:
          return None, None
  
      left, right = None, None
      if label_domain.HasField("min"):
          left = float(label_domain.min)
      if label_domain.HasField("max"):
          right = float(label_domain.max)
      return left, right
  
file_path: model-analysis/tensorflow_model_analysis/metrics/calibration_plot.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  from tensorflow_model_analysis.metrics import calibration_histogram
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _find_label_domain(eval_config, schema, model_name, output_name) and returns: left,  right, None,  None, None,  None, None,  None, None,  None