def METHOD_NAME(indices):
    batch_idx = paddle.concat(
        [paddle.full_like(src, i) for i, (src, _) in enumerate(indices)])
    src_idx = paddle.concat([src for (src, _) in indices])
    return batch_idx, src_idx