@staticmethod
def _get_points_to_use(data, points_per_side):
    """Get a number of points from the spectrum to use for a fit.

        Slices the list of all data points to have a list of
        points from each side of the spectrum to consider as noise.

        WARNING: The spectral data needs to be provided and/or the percentage
        to use set in a way that no actual peak lies in this range.

        Parameters
        ----------
        data: :class:`list`
            List from which points should be used on each side.

        points_per_side: :class:'int'
            How many points from each end of the list should be used.

        Returns
        -------
        points_to_use: :class:`list`
            List only containing the correct number of points from each side
            and not the points in between.
        """
    left_part = data[:points_per_side + 1]
    right_part = data[len(data) - points_per_side - 1:]
    points_to_use = left_part
    points_to_use.extend(right_part)
    return points_to_use
