def rescale(parent_spline, rescaler, *args):
    """Rescale knot distribution of spline object.

    Parameters
    ----------
    parent_spline : type
        spline class type
    rescaler : function
        function with positive derivative from unit interval to unit interval

    Returns
    -------
    Type[Splines]
        spline object with rescaled knots
    """

    class Helper(parent_spline):
        """Helper class to inherit from custom class.

        Parameters
        ----------
        parent_spline : Type[Splines]
            spline object
        """

        def __init__(self):
            """Construct new spline object and initialize parent spline."""
            super().__init__(*args)

        def _scale(self, xi):
            """Overrides original scaling method for knots.

            Parameters
            ----------
            xi : torch.Tensor
                knot sequence

            Returns
            -------
            torch.Tensor
                knots scaled to data interval with rescaled distribution
            """
            return super()._scale(rescaler(xi))

    return Helper()