code: def assertHasMetadata(
      self, hf: h5py.File, config: ConfigSchema
  ) -> None:
      self.assertEqual(hf.attrs["format_version"], 1)
      self.assertEqual(
          json.loads(hf.attrs["config/json"]), config.to_dict()
      )
      self.assertCountEqual(
          [
              key.partition("/")[-1]
              for key in hf.attrs.keys()
              if key.startswith("iteration/")
          ],
          [
              "num_epochs",
              "epoch_idx",
              "num_edge_paths",
              "edge_path_idx",
              "edge_path",
              "num_edge_chunks",
              "edge_chunk_idx",
          ],
      )
  
imports: import json
  import logging
  import os.path
  import random
  import time
  import unittest
  from functools import partial
  from tempfile import TemporaryDirectory
  from typing import Dict, Iterable, List, Mapping, NamedTuple, Tuple, Union
  from unittest import main, TestCase
  import attr
  import h5py
  import numpy
  import torch
  import torch.multiprocessing
  from torchbiggraph.config import ConfigSchema, EntitySchema, RelationSchema
  from torchbiggraph.eval import do_eval
  from torchbiggraph.partitionserver import run_partition_server
  from torchbiggraph.stats import SerializedStats
  from torchbiggraph.train import train
  from torchbiggraph.train_gpu import CPP_INSTALLED
  from torchbiggraph.util import call_one_after_the_other, setup_logging, SubprocessInitializer
label_desc: Use image node_id 2 for calling the TestFunctional obj's underlying member method code with example usage: obj.assertHasMetadata(hf, config) without return types