code: def __init__(self, p, reg_lambda):
      super().__init__()
      assert p in (
          1.0,
          2.0,
      ), "Sparse Lp regularization only implemented for p = 1.0 and p = 2.0."
      assert (
          reg_lambda > 0
      ), "factor ahead of regularization should be greater than 0."
      self.p = p
      self.reg_lambda = reg_lambda
  
imports: from caffe2.python import core, utils
  import numpy
label_desc: Use image node_id 1 to create a new SparseLpNorm object from inherited base classes: Regularizer with example: obj = SparseLpNorm(p, reg_lambda)