code: def test_hyperparams_repository_saves_subsequent_data(
      tmpdir,
      cx_repo_ctor: Callable[[TmpDir], AutoMLContext],
      _dataclass: BaseDataclass,
  ):
      loc: ScopedLocation = SOME_FULL_SCOPED_LOCATION.at_dc(_dataclass)
      cx: AutoMLContext = cx_repo_ctor(tmpdir).with_loc(loc)
      repo: HyperparamsRepository = cx.repo
      repo.save(
          copy.deepcopy(SOME_ROOT_DATACLASS),
          scope=ScopedLocation(),
          deep=True,
      )
      old_id = _dataclass.get_id()
      next_id = (
          old_id + 1 if isinstance(old_id, int) else old_id + "_next"
      )
      next_dataclass = copy.deepcopy(_dataclass).set_id(next_id)
      next_loc = loc.popped().with_dc(next_dataclass)
  
      repo.save(next_dataclass, scope=next_loc, deep=False)
  
      restored_next_dataclass_empty = repo.load(next_loc, deep=True)
      assert restored_next_dataclass_empty == next_dataclass.empty()
  
      restored_next_dataclass_empty = repo.load(next_loc, deep=False)
      assert restored_next_dataclass_empty == next_dataclass.empty()
  
      repo.save(next_dataclass, scope=next_loc, deep=True)
  
      restored_dataclass_shallow = repo.load(next_loc, deep=False)
      assert restored_dataclass_shallow == next_dataclass.shallow()
  
      restored_dataclass_deep = repo.load(next_loc, deep=True)
      assert restored_dataclass_deep == next_dataclass
  
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 9 for calling a global function with example usage: test_hyperparams_repository_saves_subsequent_data(tmpdir, cx_repo_ctor, _dataclass) without return types