class_docstr: MaxLengthClipSampler is a thin wrapper on top of clip samplers in TorchVision.
  
  It takes as input a TorchVision clip sampler, and an optional argument
  `num_samples` to limit the number of samples.
class_docstr_tok: ["MaxLengthClipSampler","is","a","thin","wrapper","on","top","of","clip","samplers","in","TorchVision",".","It","takes","as","input","a","TorchVision","clip","sampler",",","and","an","optional","argument","`","num_samples","`","to","limit","the","number","of","samples","."]
code: def __len__(self):
      full_size = len(self.clip_sampler)
      if self.num_samples is None:
          return full_size
  
      return min(full_size, self.num_samples)
  
imports: import logging
  import os
  from typing import Any, Callable, Dict, Optional
  import torch
  from classy_vision.generic.distributed_util import get_rank, get_world_size
  from torch.utils.data import Sampler
  from torchvision import get_video_backend
  from torchvision.datasets.samplers.clip_sampler import DistributedSampler, RandomClipSampler, UniformClipSampler
  from .classy_dataset import ClassyDataset
label_desc: Use image node_id 3 for calling the MaxLengthClipSampler obj's underlying member method code with example usage: obj.__len__() and returns: min, full_size