class_docstr: Base class for representing metrics.
  
  The `fetch_trial_data` method is the essential method to override when
  subclassing, which specifies how to retrieve a Metric, for a given trial.
  
  A Metric must return a Data object, which requires (at minimum) the following:
      https://ax.dev/api/_modules/ax/core/data.html#Data.required_columns
  
  Attributes:
      lower_is_better: Flag for metrics which should be minimized.
      properties: Properties specific to a particular metric.
class_docstr_tok: ["Base","class","for","representing","metrics",".","The","`","fetch_trial_data","`","method","is","the","essential","method","to","override","when","subclassing",",","which","specifies","how","to","retrieve","a","Metric",",","for","a","given","trial",".","A","Metric","must","return","a","Data","object",",","which","requires","(","at","minimum",")","the","following",":","https",":","\/\/ax.dev\/api\/_modules\/ax\/core\/data.html","#","Data.required_columns","Attributes",":","lower_is_better",":","Flag","for","metrics","which","should","be","minimized",".","properties",":","Properties","specific","to","a","particular","metric","."]
code: def maybe_raise_deprecation_warning_on_class_methods(self) -> None:
      # This is a temporary hack to allow us to deprecate old metric class method
      # implementations. There does not seem to be another way of checking whether
      # base class' classmethods are overridden in subclasses.
      is_fetch_trial_data_multi_overriden = (
          getattr(
              self.__class__.fetch_trial_data_multi,
              "__code__",
              "DEFAULT",
          )
          != Metric.fetch_trial_data_multi.__code__  # pyre-ignore[16]
      )
      is_fetch_experiment_data_multi_overriden = (
          getattr(
              self.__class__.fetch_experiment_data_multi,
              "__code__",
              "DEFAULT",
          )
          != Metric.fetch_experiment_data_multi.__code__  # pyre-ignore[16]
      )
      # Raise deprecation warning if this method from the base class is used (meaning
      # that it is not overridden and the classmethod is overridden instead), unless
      # the only overridden method is `fetch_trial_data` (in which case the setup is
      # not changing for that metric with the deprecation of the classmethods).
      if (
          is_fetch_trial_data_multi_overriden
          or is_fetch_experiment_data_multi_overriden
      ):
          warnings.warn(  # noqa B028 (level 1 stack trace is ok in this case)
              DeprecationWarning(
                  "Data-fetching class-methods: `fetch_trial_data_multi` and "
                  "`fetch_experiment_data_multi`, will soon be deprecated in Ax. "
                  "please leverage instance-methods like `bulk_fetch_trial_data` "
                  "or `bulk_fetch_experiment_data` instead going forward. "
                  f"Metric {self.name} (class: {self.__class__} in {self.__module__})"
                  " implementation overrides the class methods."
              )
          )
  
imports: from __future__ import annotations
  import traceback
  import warnings
  from dataclasses import dataclass
  from functools import reduce
  from logging import Logger
  from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type, TYPE_CHECKING
  from ax.core.data import Data
  from ax.utils.common.base import SortableBase
  from ax.utils.common.logger import get_logger
  from ax.utils.common.result import Err, Ok, Result, UnwrapError
  from ax.utils.common.serialization import SerializationMixin
label_desc: Use image node_id 15 for calling the Metric obj's underlying member method code with example usage: obj.maybe_raise_deprecation_warning_on_class_methods() without return types