code: def setUp(self):
      if "NTA_DYNAMIC_CONF_DIR" in os.environ:
          # Remove it to make sure our in-proc tests won't accidentally
          # mess with actual files
          oldNtaDynamicConfDir = os.environ["NTA_DYNAMIC_CONF_DIR"]
          del os.environ["NTA_DYNAMIC_CONF_DIR"]
          self.addCleanup(
              os.environ.update,
              dict(NTA_DYNAMIC_CONF_DIR=oldNtaDynamicConfDir),
          )
  
      self.files = dict()
  
      tmpDir = tempfile.mkdtemp()
      self.addCleanup(shutil.rmtree, tmpDir)
  
      with open(
          os.path.join(tmpDir, "nupic-default.xml-unittest"), "w"
      ) as fp:
          with open(
              resource_filename(__name__, "conf/nupic-default.xml")
          ) as inp:
              fp.write(inp.read())
              self.files["nupic-default.xml"] = fp.name
  
      with open(
          os.path.join(tmpDir, "nupic-site.xml-unittest"), "w"
      ) as fp:
          with open(
              resource_filename(__name__, "conf/nupic-site.xml")
          ) as inp:
              fp.write(inp.read())
              self.files["nupic-site.xml"] = fp.name
  
      with open(os.path.join(tmpDir, "nupic-custom.xml"), "w") as fp:
          with open(
              resource_filename(__name__, "conf/nupic-custom.xml")
          ) as inp:
              fp.write(inp.read())
              self.files["nupic-custom.xml"] = fp.name
  
      self.customParam = "nupic.custom.hello"
      self.customValue = "world"
  
      configuration.Configuration.clear()
  
imports: from copy import copy
  import os
  import shutil
  from StringIO import StringIO
  import sys
  import tempfile
  import unittest2
  import uuid
  from pkg_resources import resource_filename
  from mock import Mock, patch
  from pkg_resources import resource_filename
  from xml.parsers.expat import ExpatError
  import nupic
  import nupic.support.configuration_custom
  import configuration_test
label_desc: Use image node_id 1 for calling the ConfigurationCustomTest obj's underlying member method code with example usage: obj.setUp() without return types