code: def test_non_existing_niftynet_home_created(self):
      niftynet_home = expanduser(
          NiftyNetGlobalConfigTestBase.default_config_opts["home"]
      )
      NiftyNetGlobalConfigTestBase.remove_path(niftynet_home)
      self.assertFalse(isdir(niftynet_home))
      niftynet_ext = join(
          niftynet_home,
          NiftyNetGlobalConfigTestBase.default_config_opts["ext"],
      )
      self.assertFalse(isfile(join(niftynet_ext, "__init__.py")))
      for mod in NiftyNetGlobalConfigTestBase.default_config_opts[
          "ext_mods"
      ]:
          self.assertFalse(
              isfile(join(niftynet_ext, mod, "__init__.py"))
          )
  
      global_config = NiftyNetGlobalConfig().setup()
  
      self.assertTrue(isdir(niftynet_home))
      self.assertTrue(isfile(join(niftynet_ext, "__init__.py")))
      for mod in NiftyNetGlobalConfigTestBase.default_config_opts[
          "ext_mods"
      ]:
          self.assertTrue(
              isfile(join(niftynet_ext, mod, "__init__.py"))
          )
  
imports: from glob import glob
  from os import remove, makedirs
  from os.path import expanduser, join, isdir, isfile
  from os.path import getmtime
  from shutil import rmtree
  from unittest import TestCase
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
label_desc: Use image node_id 1 for calling the TestNonExistingNiftynetHomeCreated obj's underlying member method code with example usage: obj.test_non_existing_niftynet_home_created() without return types