code: def sgd_priv(w_cur, lrp, hyper_dict):
      """Implementation of DP-SGD.
  
      w = current point
      lr = logistic regression
      i = iteration number
      pb = auxillary information
  
      output is the next iterate
      """
      batch_size = hyper_dict["batch_size"]
      sigma_privacy = hyper_dict["noise_multiplier"]
      lr_sgd = 4  # learning rate based on the smoothness
      sample_rate = batch_size / lrp.num_samples  # sampling probability
      sample_vec = np.random.binomial(
          n=1, p=sample_rate, size=lrp.num_samples
      )
      batch_idx = np.where(sample_vec == 1)[0]  # index of batch
      batch_size_t = len(batch_idx)
      noise = np.random.normal(scale=sigma_privacy, size=lrp.dim)
      grad_minibatch = lrp.grad_wor(
          w_cur, batch_idx
      )  # average gradient over batch_idx
      return w_cur - lr_sgd * (
          batch_size_t / batch_size * grad_minibatch
          + noise / batch_size
      )
  
imports: import time
  from my_logistic_regression import MyLogisticRegression
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: sgd_priv(w_cur, lrp, hyper_dict) and returns: unknown