code: def test_property_reevaluation(repo1=None):
      ds = Dataset(repo1)
      assert_is_none(ds.repo)
      assert_is_not_none(ds.config)
      first_config = ds.config
      assert_false(ds._cfg_bound)
      assert_is_none(ds.id)
  
      ds.create()
      assert_repo_status(repo1)
      # after creation, we have `repo`, and `config` was reevaluated to point
      # to the repo's config:
      assert_is_not_none(ds.repo)
      assert_is_not_none(ds.config)
      second_config = ds.config
      assert_true(ds._cfg_bound)
      assert_is(ds.config, ds.repo.config)
      assert_is_not(first_config, second_config)
      assert_is_not_none(ds.id)
      first_id = ds.id
  
      ds.drop(what="all", reckless="kill", recursive=True)
      # repo is gone, and config is again reevaluated to only provide user/system
      # level config:
      assert_false(lexists(ds.path))
      assert_is_none(ds.repo)
      assert_is_not_none(ds.config)
      third_config = ds.config
      assert_false(ds._cfg_bound)
      assert_is_not(second_config, third_config)
      assert_is_none(ds.id)
  
      ds.create()
      assert_repo_status(repo1)
      # after recreation everything is sane again:
      assert_is_not_none(ds.repo)
      assert_is_not_none(ds.config)
      assert_is(ds.config, ds.repo.config)
      forth_config = ds.config
      assert_true(ds._cfg_bound)
      assert_is_not(third_config, forth_config)
      assert_is_not_none(ds.id)
      assert_not_equal(ds.id, first_id)
  
imports: import os
  import os.path
  from os.path import abspath
  from os.path import join
  from os.path import lexists, relpath
  import pytest
  import datalad.utils
  from datalad import cfg
  from datalad.api import clone, create, get
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import NoDatasetFound
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, SkipTest, assert_equal, assert_false, assert_is, assert_is_instance, assert_is_none, assert_is_not, assert_is_not_none, assert_not_equal, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_true, eq_, known_failure_windows, ok_, swallow_logs, with_tempfile
  from datalad.utils import Path, _path_, chpwd, on_windows, rmtree
  from ..dataset import Dataset, EnsureDataset, require_dataset, resolve_path
label_desc: Use image node_id 10 for calling a global function with example usage: test_property_reevaluation(repo1) without return types