class_docstr: Context manager that adds a forward hook to the embedding module,
  to insert noise into the model and detatch embedding when doing
  this pass
class_docstr_tok: ["Context","manager","that","adds","a","forward","hook","to","the","embedding","module",",","to","insert","noise","into","the","model","and","detatch","embedding","when","doing","this","pass"]
code: def _hook_implementation(self, module, input, output):
      noise = self.context.noise_sampler.sample(
          sample_shape=output.shape
      ).to(output)
      return output.clone().detach() + noise
  
imports: from contextlib import AbstractContextManager
  from enum import Enum
  from typing import Dict
  import torch
  import torch.nn.functional
  from pytext.common.constants import Stage
  from pytext.config import ConfigBase
  from pytext.utils.precision import maybe_float
label_desc: Use image node_id 4 for calling the R3FNoiseContextManager obj's underlying member method code with example usage: obj._hook_implementation(module, input, output) and returns: unknown