code: def _normalize_probabilities(self, outputs, probabilities):
          
          outputs = list(outputs)
          total = np.sum(probabilities, axis=1)
          if self.allow_null_transition or not np.any(total):
              if np.any(total > 1+1e-08):  # Accommodate rounding errors
                  raise ValueError(
                      "Null transition requested with un-normalized probability weights: {}".format(probabilities))
              total[total > 1] = 1  # Correct allowed rounding errors.
              probabilities = np.concatenate([probabilities, (1-total)[:, np.newaxis]], axis=1)
              outputs.append('null_transition')
          return outputs, probabilities/(np.sum(probabilities, axis=1)[:, np.newaxis])
docs: Normalize probabilities to sum to 1 and add a null transition if desired.
  
          Parameters
          ----------
          outputs : iterable
              List of possible end states corresponding to this containers transitions.
          probabilities : iterable of iterables
              A set of probability weights whose columns correspond to the end states in `outputs`
              and whose rows correspond to each simulant undergoing the transition.
  
          Returns
          -------
          outputs: list
              The original output list expanded to include a null transition (a transition back
              to the starting state) if requested.
          probabilities : ndarray
              The original probabilities rescaled to sum to 1 and potentially expanded to
              include a null transition weight.