def METHOD_NAME(self, n_timepoints):
    """Check values of parameters for Slope transformer.
    Throws
    ------
    ValueError or TypeError if a parameters input is invalid.
    """
    if isinstance(self.n_intervals, int):
        if self.n_intervals <= 0:
            raise ValueError(
                "num_intervals must have the value \
                              of at least 1"
            )
        if self.n_intervals > n_timepoints:
            raise ValueError(
                "num_intervals cannot be higher than \
                              subsequence_length"
            )
    else:
        raise TypeError(
            "num_intervals must be an 'int'. Found '"
            + type(self.n_intervals).__name__
            + "'instead."
        )