class_docstr: :class:`~opacus.optimizers.optimizer.DPOptimizer` that implements
  per layer clipping strategy and is compatible with distributed data parallel
class_docstr_tok: [":","class",":","`","~opacus.optimizers.optimizer.DPOptimizer","`","that","implements","per","layer","clipping","strategy","and","is","compatible","with","distributed","data","parallel"]
docstr: The reason why we need self is because of generator for secure_mode
docstr_tok: ["The","reason","why","we","need","self","is","because","of","generator","for","secure_mode"]
code: def _add_noise_parameter(self, p: nn.Parameter):
      """
      The reason why we need self is because of generator for secure_mode
      """
      noise = _generate_noise(
          std=self.noise_multiplier * self.max_grad_norm,
          reference=p.summed_grad,
          generator=None,
          secure_mode=self.secure_mode,
      )
      p.grad = p.summed_grad + noise
  
imports: from __future__ import annotations
  from functools import partial
  from typing import Callable, List, Optional
  import torch
  from opt_einsum import contract
  from torch import nn
  from torch.optim import Optimizer
  from .ddpoptimizer import DistributedDPOptimizer
  from .optimizer import DPOptimizer, _generate_noise
  from .perlayeroptimizer import DPPerLayerOptimizer
label_desc: Use image node_id 2 for calling the DistributedPerLayerOptimizer obj's underlying member method code with example usage: obj._add_noise_parameter(p) without return types