code: def disk_repo_ctor(tmpdir: TmpDir = None) -> AutoMLContext:
      cx = CX()
      tmpdir = tmpdir or cx.get_new_cache_folder()
      return AutoMLContext.from_context(
          cx, repo=HyperparamsOnDiskRepository(tmpdir)
      )
  
imports: import copy
  from typing import Callable, List
  import pytest
  from neuraxle.base import CX
  from neuraxle.metaopt.context import AutoMLContext
  from neuraxle.metaopt.data.aggregates import Client, Project, Root
  from neuraxle.metaopt.data.vanilla import DEFAULT_CLIENT, DEFAULT_PROJECT, BaseDataclass, ClientDataclass, ProjectDataclass, RootDataclass, RoundDataclass, ScopedLocation
  from neuraxle.metaopt.repositories.db import SQLLiteHyperparamsRepository
  from neuraxle.metaopt.repositories.json import HyperparamsOnDiskRepository
  from neuraxle.metaopt.repositories.repo import HyperparamsRepository
  from testing_neuraxle.metaopt.test_automl_dataclasses import ALL_DATACLASSES, SOME_CLIENT_DATACLASS, SOME_FULL_SCOPED_LOCATION, SOME_PROJECT_DATACLASS, SOME_ROOT_DATACLASS, SOME_ROUND_DATACLASS
label_desc: Use image node_id 2 for calling a global function with example usage: disk_repo_ctor(tmpdir) and returns: AutoMLContext