code: def background_sum(self):
          
  
          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
docs: 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.