<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _total_mask(self):
 """ Combination of the _segment_mask, _input_mask, and _data_mask. This mask is applied to ``data``, ``error``, and ``background`` inputs when calculating properties. """


        mask = self._segment_mask | self._data_mask

        if self._input_mask is not None:
            mask |= self._input_mask

        return mask