class_docstr: Helper to visualize the clusters assignment of images
  
  This class is meant to be used in a notebook and will generate
  visualisations for the different clusters
class_docstr_tok: ["Helper","to","visualize","the","clusters","assignment","of","images","This","class","is","meant","to","be","used","in","a","notebook","and","will","generate","visualisations","for","the","different","clusters"]
code: def _select_images(
      self, image_ids: List[int], num_images: int, seed: int
  ):
      if num_images < len(image_ids):
          np.random.seed(seed)
          chosen_image_ids = np.random.choice(
              image_ids, size=num_images, replace=False
          )
          images = [
              self.data_source[image_id][0]
              for image_id in chosen_image_ids
          ]
      else:
          images = [
              self.data_source[image_id][0] for image_id in image_ids
          ]
      return images
  
file_path: vissl/vissl/utils/cluster_utils.py
imports: import os
  from dataclasses import dataclass
  from typing import Dict, List
  import numpy
  import torch
  from iopath.common.file_io import g_pathmgr
  from vissl.config import AttrDict
  from vissl.data import build_dataset
label_desc: Use image node_id 3 for calling the ClusterVisualizer obj's underlying member method code with example usage: obj._select_images(image_ids, num_images, seed) and returns: images