code: def validate_single_metric_data(data: SingleMetricData) -> None:
      if isinstance(data, tuple):
          if len(data) != 2:
              raise TypeError(
                  f"Tuple-valued SingleMetricData must have len == 2, found {data}"
              )
  
          mean, sem = data
          validate_floatlike(floatlike=mean)
  
          if sem is not None:
              validate_floatlike(floatlike=sem)
  
      else:
          validate_floatlike(floatlike=data)
  
file_path: Ax/ax/core/types.py
imports: import enum
  from typing import Any, Callable, DefaultDict, Dict, Hashable, List, Optional, Tuple, Union
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: validate_single_metric_data(data) without return types