class_docstr: A custom dataset class for loading images from a directory structure.
  This class inherits from torch.utils.data.Dataset.
class_docstr_tok: ["A","custom","dataset","class","for","loading","images","from","a","directory","structure",".","This","class","inherits","from","torch.utils.data.Dataset","."]
code: def __len__(self) -> int:
      return len(self._samples)
  
file_path: NeMo/nemo/collections/multimodal/data/nsfw/nsfw_dataset.py
imports: import pathlib
  from typing import Callable, List, Optional, Tuple
  import torch
  from omegaconf.dictconfig import DictConfig
  from PIL import Image
  from nemo.collections.multimodal.data.clip.augmentations.augmentations import image_transform
label_desc: Use image node_id 3 for calling the DirectoryBasedDataset obj's underlying member method code with example usage: obj.__len__() and returns: len