code: def log_metrics(self, data, name: str, type: Optional[str] = None):
      return self.handler.log_metrics(
          OneTimeMetrics(
              name=name,
              type=type,
              groups=[
                  *self.namespace.metric_groups,
                  self.namespace.get_group(),
              ],
              data=data,
          )
      )
  
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 2 for calling the MetricsWrap obj's underlying member method code with example usage: obj.log_metrics(data, name, type) and returns: self