code: def pts_to_distogram(
      pts, min_bin=2.3125, max_bin=21.6875, no_bins=64
  ):
      boundaries = torch.linspace(
          min_bin, max_bin, no_bins - 1, device=pts.device
      )
      dists = torch.sqrt(
          torch.sum(
              (pts.unsqueeze(-2) - pts.unsqueeze(-3)) ** 2, dim=-1
          )
      )
      return torch.bucketize(dists, boundaries)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/tensor_utils.py
imports: from functools import partial
  from typing import List
  import torch
  import torch.nn
label_desc: Use image node_id 5 for calling a global function with example usage: pts_to_distogram(pts, min_bin, max_bin, no_bins) and returns: torch