<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def background_sum(self):
 """ The sum of ``background`` values within the source segment. Pixel values that are masked in the input ``data``, including any non-finite pixel values (i.e. NaN, infs) that are automatically masked, are also masked in the background array. """


        if self._background is not None:
            if self._is_completely_masked:
                return np.nan * self._background_unit  # unit for table
            else:
                return np.sum(self._background_values)
        else:
            return None