def METHOD_NAME(self, batches: List[Tuple[int, Tensor]]) -> SubData:
    batch_ids, n_ids = zip(*batches)
    n_id = torch.cat(n_ids, dim=0)
    batch_id = torch.tensor(batch_ids)
    # We collect the in-mini-batch size (`batch_size`), the offset of each
    # partition in the mini-batch (`offset`), and the number of nodes in
    # each partition (`count`)
    batch_size = n_id.numel()
    offset = self.ptr[batch_id]
    count = self.ptr[batch_id.add_(1)].sub_(offset)
    rowptr, col, value = self.data.adj_t.csr()
    rowptr, col, value, n_id = relabel_fn(rowptr, col, value, n_id,
                                          self.bipartite)
    adj_t = SparseTensor(rowptr=rowptr, col=col, value=value,
                         sparse_sizes=(rowptr.numel() - 1, n_id.numel()),
                         is_sorted=True)
    data = self.data.__class__(adj_t=adj_t)
    for k, v in self.data:
        if isinstance(v, Tensor) and v.size(0) == self.data.num_nodes:
            data[k] = v.index_select(0, n_id)
    return SubData(data, batch_size, n_id, offset, count)