code: def test_existing_config_file_loaded(self):
      # create a config file with a custom NiftyNet home
      makedirs(NiftyNetGlobalConfigTestBase.config_home)
      custom_niftynet_home = "~/customniftynethome"
      custom_niftynet_home_abs = expanduser(custom_niftynet_home)
      config = "".join(["home = ", custom_niftynet_home])
      with open(
          NiftyNetGlobalConfigTestBase.config_file, "w"
      ) as config_file:
          config_file.write(
              "\n".join([NiftyNetGlobalConfigTestBase.header, config])
          )
  
      global_config = NiftyNetGlobalConfig().setup()
      self.assertEqual(
          global_config.get_niftynet_home_folder(),
          custom_niftynet_home_abs,
      )
      NiftyNetGlobalConfigTestBase.remove_path(custom_niftynet_home_abs)
  
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 TestExistingConfigFileLoaded obj's underlying member method code with example usage: obj.test_existing_config_file_loaded() without return types