def METHOD_NAME(d: Any) -> Any:
    if isinstance(d, pipeline_channel.PipelineParameterChannel):
        reversed_call_inputs = {
            pipeline_param_chan: name
            for name, pipeline_param_chan in call_inputs.items()
        }
        # minimizes importer spec interface by not creating new
        # inputspec/parameters if the same input is used multiple places
        # in metadata
        unique_name = reversed_call_inputs.get(
            d,
            utils.make_name_unique_by_adding_index(
                METADATA_KEY,
                list(call_inputs),
                '-',
            ),
        )
        call_inputs[unique_name] = d
        component_inputs[unique_name] = structures.InputSpec(
            type=d.channel_type)
        return placeholders.InputValuePlaceholder(
            input_name=unique_name)._to_string()
    elif isinstance(d, dict):
        # use this instead of list comprehension to ensure compiles are identical across Python versions
        res = {}
        for k, v in d.items():
            new_k = METHOD_NAME(k)
            new_v = METHOD_NAME(v)
            res[new_k] = new_v
        return res
    elif isinstance(d, list):
        return [METHOD_NAME(el) for el in d]
    elif isinstance(d, str):
        # extract pipeline channels from f-strings, if any
        pipeline_channels = pipeline_channel.extract_pipeline_channels_from_any(
            d)
        # pass the channel back into the recursive function to create the placeholder, component inputs, and call inputs, then replace the channel with the placeholder
        for channel in pipeline_channels:
            input_placeholder = METHOD_NAME(
                channel)
            d = d.replace(channel.pattern, input_placeholder)
        return d
    else:
        return d