def pad_and_batch(self, ids):
    max_len = max(map(len, ids))
    padded = np.stack([np.pad(i, [[0, (max_len - len(i))]], mode='constant') for i in ids])
    padded = np.expand_dims(padded, axis=(- 1))
    return padded
def pad_and_batch(self, ids):
    max_len = max(map(len, ids))
    padded = np.stack([np.pad(i, [[0, (max_len - len(i))]], mode='constant') for i in ids])
    padded = np.expand_dims(padded, axis=(- 1))
    return padded