Render variables in configuration object but don't instantiate anything

def render_configuration(self, configuration=None):
        """ Render variables in configuration object but don't instantiate anything """
        if configuration is None:
            configuration = self.environment

        if isinstance(configuration, dict):
            return {k: self.render_configuration(v) for k, v in configuration.items()}
        elif isinstance(configuration, list):
            return [self.render_configuration(x) for x in configuration]
        elif isinstance(configuration, Variable):
            return configuration.resolve(self.parameters)
        else:
            return configuration