code: def __len__(self):
      if self.subset_size:
          return self.subset_size
      return len(self.dataset)
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/samplers/tuples_to_weights_sampler.py
imports: import numpy
  import torch
  from torch.utils.data.sampler import Sampler
  from ..testers import BaseTester
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
label_desc: Use image node_id 2 for calling the TuplesToWeightsSampler obj's underlying member method code with example usage: obj.__len__() and returns: len, self