code: def _log_one_time_metrics(self, metrics: "OneTimeMetrics"):
      if (
          metrics.name,
          tuple(metrics.groups),
      ) in self._one_time_metrics:
          raise ValueError(
              f"duplicated metrics: `{metrics.name}` already exists"
          )
      else:
          self._one_time_metrics[
              (metrics.name, tuple(metrics.groups))
          ] = metrics
  
imports: import time
  import typing
  from typing import Dict, List, Optional, Tuple, Union
  import pydantic
  from ._namespace import NS, IndexedNS
label_desc: Use image node_id 3 for calling the InMemoryMetricsHandler obj's underlying member method code with example usage: obj._log_one_time_metrics(metrics) without return types