def METHOD_NAME(orig_par, to_rename):
    for key, value in orig_par.items():
        # rename the key in par based on the `to_rename` dict
        if key in to_rename.keys():
            new_key = to_rename[key]
            # also turn value into a Path
            if isinstance(value, list):
                new_value = [Path(val) for val in value]
            else:
                new_value = Path(value)
        else:
            new_key = key
            new_value = value
        yield new_key, new_value