code: def test_get_all_pairs_triplets_indices(self):
      original_x = torch.arange(10)
  
      for i in range(1, 11):
          x = original_x.repeat(i)
          correct_num_pos = len(x) * (i - 1)
          correct_num_neg = len(x) * (len(x) - i)
          a1, p, a2, n = lmu.get_all_pairs_indices(x)
          self.assertTrue(len(a1) == len(p) == correct_num_pos)
          self.assertTrue(len(a2) == len(n) == correct_num_neg)
  
          correct_num_triplets = len(x) * (i - 1) * (len(x) - i)
          a, p, n = lmu.get_all_triplets_indices(x)
          self.assertTrue(
              len(a) == len(p) == len(n) == correct_num_triplets
          )
  
file_path: pytorch-metric-learning/tests/utils/test_loss_and_miner_utils.py
imports: import unittest
  import torch
  from pytorch_metric_learning.utils import loss_and_miner_utils
  from ..None import TEST_DEVICE, TEST_DTYPES
label_desc: Use image node_id 2 for calling the TestLossAndMinerUtils obj's underlying member method code with example usage: obj.test_get_all_pairs_triplets_indices() without return types