class_docstr: A sliceable version of :class:`chainer.datasets.TupleDataset`.
  
  Here is an example.
  
  >>> # omit keys
  >>> dataset = TupleDataset([0, 1, 2], [0, 1, 4])
  >>> dataset.keys  # (None, None)
  >>> dataset.slice[:, 0][:]  # [0, 1, 2]
  >>>
  >>> dataset_more = TupleDataset(dataset, [0, 1, 8])
  >>> dataset_more.keys  # (None, None, None)
  >>> dataset_more.slice[:, [1, 2]][:]  # [(0, 0), (1, 1), (4, 8)]
  >>>
  >>> # specify the name of a key
  >>> named_dataset = TupleDataset(('feat0', [0, 1, 2]), [0, 1, 4])
  >>> named_dataset.keys  # ('feat0', None)
  >>> # slice takes both key and index (or their mixture)
  >>> named_dataset.slice[:, ['feat0', 1]][:]  # [(0, 0), (1, 1), (2, 4)]
  
  Args:
      datasets: The underlying datasets.
          The following datasets are acceptable.
  
          * An inheritance of                 :class:~chainer.datasets.sliceable.SliceableDataset`.
          * A tuple of a name and a data array.                  The data array should be list or :class:`numpy.ndarray`.
          * A data array. In this case, the name of key is :obj:`None`.
code: def get_example_by_keys(self, index, key_indices):
      datasets_key_indices = defaultdict(set)
      for key_index in key_indices:
          _, dataset_index, key_index = self._keys[key_index]
          if key_index is None:
              datasets_key_indices[dataset_index] = None
          else:
              datasets_key_indices[dataset_index].add(key_index)
  
      values = {}
      for dataset_index, dataset_key_indices in six.iteritems(
          datasets_key_indices
      ):
          dataset = self._datasets[dataset_index]
          if dataset_key_indices is None:
              values[(dataset_index, None)] = dataset[index]
          else:
              dataset_key_indices = tuple(dataset_key_indices)
              values.update(
                  six.moves.zip(
                      (
                          (dataset_index, key_index)
                          for key_index in dataset_key_indices
                      ),
                      dataset.get_example_by_keys(
                          index, dataset_key_indices
                      ),
                  )
              )
  
      return tuple(
          values[self._keys[key_index][1:]] for key_index in key_indices
      )
  
file_path: chainercv/chainercv/chainer_experimental/datasets/sliceable/tuple_dataset.py
imports: from collections import defaultdict
  import six
  from chainercv.chainer_experimental.datasets.sliceable.sliceable_dataset import _as_tuple
  from chainercv.chainer_experimental.datasets.sliceable import SliceableDataset
label_desc: Use image node_id 4 for calling the TupleDataset obj's underlying member method code with example usage: obj.get_example_by_keys(index, key_indices) and returns: tuple