'Args:
ds (DataFlow): input DataFlow. ``dp[idx]`` has to be an :class:`np.ndarray`.
batch_size (int): batch size
idx (int): ``dp[idx].shape`` will be used to group datapoints.
Other components are assumed to have the same shape.'

def __init__(self, ds, batch_size, idx):

    super(BatchDataByShape, self).__init__(ds, batch_size, remainder=False)
    self.idx = idx
    self._guard = DataFlowReentrantGuard()
