code: def normalize_L2(a, dim):
      """
      L2 normalize the input tensor along the specified dimension
  
      Args:
          a(torch.Tensor): the tensor to normalize
          dim (int): along which dimension to L2 normalize
  
      Returns:
          a (torch.Tensor): L2 normalized tensor
      """
      norms = torch.sqrt(torch.sum(a**2, dim=dim, keepdim=True))
      return a / norms
  
imports: import numpy
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: normalize_L2(a, dim) and returns: unknown