code: def susvd(x, x_obs, rho, penalties):
      
  
      assert type(x) == Tensor, "Input array must be a Tensor"
  
      while True:
  
          # proximal operator for the Fro. norm
          x = squared_error(x, rho, x_obs)
  
          # sequential singular value thresholding
          for ix, penalty in enumerate(penalties):
              x = x.unfold(ix).svt(penalty / rho).fold()
  
          yield x
docs: Sequential unfolding SVD
  
      Parameters
      ----------
      x : Tensor
  
      x_obs : array_like
  
      rho : float
  
      penalties : array_like
          penalty for each unfolding of the input tensor