code: def _make_complete_graph(num_vertices):
      if num_vertices < 2:
          raise ValueError(
              "PyTorch cannot handle zero-sized multidimensional tensors"
          )
      V = num_vertices
      K = V * (V - 1) // 2
      v1 = torch.arange(V)
      v2 = torch.arange(V).unsqueeze(-1)
      v1, v2 = torch.broadcast_tensors(v1, v2)
      v1 = v1.contiguous().view(-1)
      v2 = v2.contiguous().view(-1)
      mask = v1 < v2
      grid = torch.stack((v1[mask], v2[mask]))
      assert grid.shape == (2, K)
      return grid
  
imports: import itertools
  import math
  import torch
  from torch.distributions import constraints
  from torch.distributions.utils import lazy_property
  from pyro.distributions.torch_distribution import TorchDistribution
label_desc: Use image node_id 3 for calling a global function with example usage: _make_complete_graph(num_vertices) and returns: grid