def METHOD_NAME(
    relative_dose, depth=None, normalisation_depth=None, smoothed_normalisation=False
):
    """Normalise a pdd at a given depth. If normalisation_depth is left
    undefined then the depth of dose maximum is used for the normalisation
    depth.
    """
    if smoothed_normalisation:
        filtered = scipy.signal.savgol_filter(relative_dose, 21, 2)
    else:
        filtered = relative_dose
    # normalisation_depth will be None if the user does not define it, if that
    # is the case simply define normalisation by 100 / the maximum value
    if normalisation_depth is None:
        normalisation = 100 / np.max(filtered)
    # However if the user did define a normalisation depth then need to
    # interpolate using the provided depth variable to find the relative dose
    # value to normalise to
    else:
        if depth is None:
            raise ValueError(
                "distance variable needs to be defined to normalise to a " "depth"
            )
        interpolation = scipy.interpolate.interp1d(depth, filtered)
        normalisation = 100 / interpolation(normalisation_depth)
    return relative_dose * normalisation