code: def run_from_config(
      cls, run_test: Callable, config_path: str, use_gpu: bool
  ):
      # pyre-fixme[16]: Module `yaml` has no attribute `YAML`.
      yaml = YAML(typ="safe")
      with open(config_path, "r") as f:
          config_dict = yaml.load(f.read())
      config_dict["use_gpu"] = use_gpu
  
      @make_config_class(run_test)
      class ConfigClass:
          pass
  
      config = ConfigClass(**config_dict)
      # pyre-fixme[16]: `ConfigClass` has no attribute `asdict`.
      return run_test(**config.asdict())
  
file_path: ReAgent/reagent/test/base/horizon_test_base.py
imports: import logging
  import random
  import unittest
  from typing import Callable
  import numpy
  import torch
  from reagent.core.configuration import make_config_class
  from reagent.core.tensorboardX import SummaryWriterContext
  from ruamel.yaml import YAML
label_desc: Use image node_id 3 for calling the HorizonTestBase obj's underlying member method code with example usage: obj.run_from_config(cls, run_test, config_path, use_gpu) and returns: run_test