code: def get_regularization_penalty(self) -> Union[float, torch.Tensor]:
          
          if self._regularizer is None:
              return 0.0
          else:
              return self._regularizer(self)
docs: Computes the regularization penalty for the model.
          Returns 0 if the model was not configured to use regularization.