def METHOD_NAME(batch):
    # (feat, label)
    # (( n_mels, length), label)
    feats = []
    labels = []
    lengths = []
    for sample in batch:
        feats.append(paddle.transpose(sample[0], perm=[1, 0]))
        lengths.append(sample[0].shape[1])
        labels.append(sample[1])
    max_length = max(lengths)
    for i in range(len(feats)):
        feats[i] = paddle.nn.functional.pad(
            feats[i], [0, max_length - feats[i].shape[0], 0, 0],
            data_format='NLC')
    return paddle.stack(feats), paddle.to_tensor(labels), paddle.to_tensor(
        lengths)