code: def l2_norm(input):
      input_size = input.size()
      buffer = torch.pow(input, 2)
      normp = torch.sum(buffer, 1).add_(1e-12)
      norm = torch.sqrt(normp)
      _output = torch.div(input, norm.view(-1, 1).expand_as(input))
      output = _output.view(input_size)
      return output
  
file_path: pytorch-metric-learning/tests/losses/test_proxy_anchor_loss.py
imports: from contextlib import nullcontext
  import torch
  import torch.nn
  import torch.nn.functional
  import unittest
  import torch
  from pytorch_metric_learning.losses import ProxyAnchorLoss
  from ..None import TEST_DEVICE, TEST_DTYPES
  from ..zzz_testing_utils.testing_utils import angle_to_coord
label_desc: Use image node_id 2 for calling a global function with example usage: l2_norm(input) and returns: output