code: def _to_float(value: Any) -> float:
      try:
          return float(value)
      except (ValueError, TypeError):
          raise ValueError(
              "{} is not aggregatable: value={}\n\nThis is most likely caused by a "
              "configuration error in which the aggregate option was applied "
              "incorrectly.".format(value.__class__.__name__, value)
          )
  
file_path: model-analysis/tensorflow_model_analysis/metrics/aggregation.py
imports: from typing import Any, Dict, Iterable, List, Optional
  import apache_beam
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _to_float(value) and returns: float