code: def _make_history_records(self) -> Iterable[pb.Record]:
      for _, metrics in enumerate(self.run.metrics()):
          history = pb.HistoryRecord()
          for k, v in metrics.items():
              item = history.item.add()
              item.key = k
              item.value_json = json.dumps(v)
          yield self.interface._make_record(history=history)
  
imports: import json
  import os
  import queue
  import sys
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Optional, Tuple
  from unittest.mock import patch
  from google.protobuf.json_format import ParseDict
  from tqdm import tqdm
  import wandb
  from wandb.proto import wandb_internal_pb2
  from wandb.proto import wandb_settings_pb2
  from wandb.proto import wandb_telemetry_pb2
  from wandb.sdk.interface.interface import file_policy_to_enum
  from wandb.sdk.interface.interface_queue import InterfaceQueue
  from wandb.sdk.internal import context
  from wandb.sdk.internal.sender import SendManager
  from wandb.sdk.internal.settings_static import SettingsStatic
  from wandb.util import cast_dictlike_to_dict, coalesce
label_desc: Use image node_id 5 for calling the RecordMaker obj's underlying member method code with example usage: obj._make_history_records() without return types