class_docstr: Tests included here all pertain to the NiftyNet global configuration
  file and `NiftyNetGlobalConfig` is a singleton. These require each test
  to be run separately. This is why all tests are decorated with
  `skipUnless`.
class_docstr_tok: ["Tests","included","here","all","pertain","to","the","NiftyNet","global","configuration","file","and","`","NiftyNetGlobalConfig","`","is","a","singleton",".","These","require","each","test","to","be","run","separately",".","This","is","why","all","tests","are","decorated","with","`","skipUnless","`","."]
docstr: Remove passed item, whether it's a file or directory.
docstr_tok: ["Remove","passed","item",",","whether","it","'s","a","file","or","directory","."]
code: def remove_path(cls, path):
      """Remove passed item, whether it's a file or directory."""
      print("removing {}".format(path))
      if isdir(path):
          rmtree(path)
      elif isfile(path):
          remove(path)
  
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 2 for calling the NiftyNetGlobalConfigTestBase obj's underlying member method code with example usage: obj.remove_path(cls, path) without return types