from typing import Any


def to_pipeline_params(params: dict[str, Any], step_prefix: str):
    """Rename estimator parameters to be usable an a pipeline.

    See https://scikit-learn.org/stable/modules/compose.html#pipeline.
    """
    return {"{0}__{1}".format(step_prefix, key): value for key, value in params.items()}