code: def load_config(f, spec):
      
      dirname = os.path.dirname(f)
      if not os.path.exists(dirname):
          os.makedirs(dirname)
      c = ConfigObj(infile=f, configspec=spec,
                    interpolation=False, create_empty=True)
      try:
          clean_config(c)
      except ConfigError, e:
          msg = "Config %s could not be loaded. Reason: %s" % (c.filename, e)
          log.debug(msg)
          raise ConfigError(msg)
      return c
docs: Return the ConfigObj for the specified file
  
      :param f: the config file path
      :type f: str
      :param spec: the path to the configspec
      :type spec: str
      :returns: the loaded ConfigObj
      :rtype: ConfigObj
      :raises: ConfigError