code: def __getitem__(self, index):
      item = self.dataset[index]
      is_tuple = isinstance(item, tuple)
      srcs = item if is_tuple else [item]
  
      for offset, src in zip(self.offsets, srcs):
          for k, v in self.replace_map.items():
              src_off = src[offset:] if offset >= 0 else src[:offset]
              src_off.masked_fill_(src_off == k, v)
  
      item = srcs if is_tuple else srcs[0]
      return item
  
imports: from .None import BaseWrapperDataset
label_desc: Use image node_id 2 for calling the ReplaceDataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: item