code: def __substitute_objects(self, value, context_dict):
          
          if type(value) == dict:
              return dict([(k, self.__substitute_objects(v, context_dict)) for k, v in value.items()])
          elif type(value) == str:
              try:
                  return value % context_dict
              except KeyError:
                  e = sys.exc_info()[1]
                  logger.warn("Could not specialize %s! Error: %s" % (value, e))
                  return value
          else:
              return value
docs: recursively substitute value with the context_dict