code: def pdist(A, B, dist_type="L2"):
      if dist_type == "L2":
          D2 = torch.sum((A.unsqueeze(1) - B.unsqueeze(0)).pow(2), 2)
          return torch.sqrt(D2 + 1e-7)
      elif dist_type == "SquareL2":
          return torch.sum((A.unsqueeze(1) - B.unsqueeze(0)).pow(2), 2)
      else:
          raise NotImplementedError("Not implemented")
  
file_path: torch-points3d/torch_points3d/core/losses/metric_losses.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: pdist(A, B, dist_type) and returns: torch, torch