human
I wrote the below code

    def f(value):
        if (not isinstance(value, basestring)):
            return value
        new_value = Template(value).safe_substitute(substitutions)
        if (new_value != value):
            LOG.debug(('Substituted    %s    ->    %s' % (repr(value), repr(new_value))))
        return new_value
    return recursive_walk(f, input_data)

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def substitute_variables(input_data, substitutions):