class_docstr: This is a generic class for 3D segmentation datasets.
  
  :param filename_pairs: a list of tuples in the format (input filename,
                         ground truth filename).
  :param cache: if the data should be cached in memory or not.
  :param transform: transformations to apply.
class_docstr_tok: ["This","is","a","generic","class","for","3D","segmentation","datasets",".",":","param","filename_pairs",":","a","list","of","tuples","in","the","format","(","input","filename",",","ground","truth","filename",")",".",":","param","cache",":","if","the","data","should","be","cached","in","memory","or","not",".",":","param","transform",":","transformations","to","apply","."]
docstr: Return the dataset size.
docstr_tok: ["Return","the","dataset","size","."]
code: def __len__(self):
      """Return the dataset size."""
      return len(self.handlers)
  
imports: import os
  import re
  import collections
  from medicaltorch import transforms
  from tqdm import tqdm
  import numpy
  import nibabel
  from torch.utils.data import Dataset
  import torch
  from torch._six import string_classes, int_classes
  from PIL import Image
label_desc: Use image node_id 4 for calling the MRI3DSegmentationDataset obj's underlying member method code with example usage: obj.__len__() and returns: len