code: def test_meta_run_tree_contexts_and_names(self):
      train_context = {"subset": "train"}
      val_context = {"subset": "val"}
      empty_context = {}
  
      run = Run(repo=self.repo, system_tracking_interval=None)
      run.track(1, name="metric 1", context=train_context)
      run.track(1, name="metric 2", context=train_context)
      run.track(1, name="metric 1", context=val_context)
      run.track(1, name="metric 2", context=val_context)
      run.track(1, name="metric 3", context=val_context)
      run.track(0, name="metric")
  
      meta_container_path = os.path.join(
          self.repo.path, "meta", "chunks", run.hash
      )
      rc = RocksContainer(meta_container_path, read_only=True)
      tree = ContainerTreeView(rc)
  
      contexts = tree.view(
          ("meta", "chunks", run.hash, "contexts")
      ).collect()
      for ctx in [train_context, val_context, empty_context]:
          self.assertIn(Context(ctx).idx, contexts)
          self.assertDictEqual(contexts[Context(ctx).idx], ctx)
  
      traces = tree.view(
          (
              "meta",
              "chunks",
              run.hash,
              "traces",
              Context(train_context).idx,
          )
      ).collect()
      self.assertSetEqual({"metric 1", "metric 2"}, set(traces.keys()))
      traces = tree.view(
          (
              "meta",
              "chunks",
              run.hash,
              "traces",
              Context(val_context).idx,
          )
      ).collect()
      self.assertSetEqual(
          {"metric 1", "metric 2", "metric 3"}, set(traces.keys())
      )
      traces = tree.view(
          (
              "meta",
              "chunks",
              run.hash,
              "traces",
              Context(empty_context).idx,
          )
      ).collect()
      self.assertSetEqual({"metric"}, set(traces.keys()))
  
file_path: aim/tests/sdk/test_run_write_container_data.py
imports: import os
  from tests.base import TestBase
  from aim.sdk import Run
  from aim.storage.context import Context
  from aim.storage.containertreeview import ContainerTreeView
  from aim.storage.rockscontainer import RocksContainer
  from aim.storage.hashing import hash_auto
label_desc: Use image node_id 2 for calling the TestRunContainerData obj's underlying member method code with example usage: obj.test_meta_run_tree_contexts_and_names() without return types