code: def regularization_update(
      self,
      model_weights,
      grad,
      fit_intercept,
      lr,
      prev_round_weights=None,
  ):
      if self.l1_penalty:
          model_weights = self._l1_updator(
              model_weights, grad, fit_intercept, lr
          )
      else:
          model_weights = model_weights - grad
      """elif self.l2_penalty:
                      model_weights = self._l2_updator(model_weights, grad)
                  """
      """if prev_round_weights is not None:  # additional proximal term for homo
              coef_ = model_weights.unboxed
  
              if model_weights.fit_intercept:
                  coef_without_intercept = coef_[: -1]
              else:
                  coef_without_intercept = coef_
  
              coef_without_intercept -= self.mu * (model_weights.coef_ - prev_round_weights.coef_)
  
              if model_weights.fit_intercept:
                  new_coef_ = np.append(coef_without_intercept, coef_[-1])
              else:
                  new_coef_ = coef_without_intercept
  
              model_weights = LinearModelWeights(new_coef_,
                                                 model_weights.fit_intercept,
                                                 model_weights.raise_overflow_error)"""
      return model_weights
  
imports: import logging
  import numpy
  import torch
label_desc: Use image node_id 11 for calling the Optimizer obj's underlying member method code with example usage: obj.regularization_update(model_weights, grad, fit_intercept, lr, prev_round_weights) and returns: model_weights