class_docstr: This class is used to build 2D segmentation datasets. It represents
  a pair of of two data volumes (the input data and the ground truth data).
  
  :param input_filename: the input filename (supported by nibabel).
  :param gt_filename: the ground-truth filename.
  :param cache: if the data should be cached in memory or not.
  :param canonical: canonical reordering of the volume axes.
class_docstr_tok: ["This","class","is","used","to","build","2D","segmentation","datasets",".","It","represents","a","pair","of","of","two","data","volumes","(","the","input","data","and","the","ground","truth","data",")",".",":","param","input_filename",":","the","input","filename","(","supported","by","nibabel",")",".",":","param","gt_filename",":","the","ground-truth","filename",".",":","param","cache",":","if","the","data","should","be","cached","in","memory","or","not",".",":","param","canonical",":","canonical","reordering","of","the","volume","axes","."]
docstr: Return the tuple (input, ground truth) representing both the input
  and ground truth shapes.
docstr_tok: ["Return","the","tuple","(","input",",","ground","truth",")","representing","both","the","input","and","ground","truth","shapes","."]
code: def get_pair_shapes(self):
      """Return the tuple (input, ground truth) representing both the input
      and ground truth shapes."""
      input_shape = self.input_handle.header.get_data_shape()
  
      # Handle unlabeled data
      if self.gt_handle is None:
          gt_shape = None
      else:
          gt_shape = self.gt_handle.header.get_data_shape()
  
      return input_shape, gt_shape
  
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 2 for calling the SegmentationPair2D obj's underlying member method code with example usage: obj.get_pair_shapes() and returns: input_shape,  gt_shape