def METHOD_NAME(encoding):
    # by default if encodings are smaller than maximum length, they are padded with
    # zeroes at the end. We need the zero padding to be at the begining for next
    # character prediction to work
    new_encoding = torch.clone(encoding)
    num_rows = encoding.shape[0]
    for i in range(num_rows):
        roll_amount = int(len(encoding[i]) - encoding[i].nonzero().max()-1)
        new_encoding[i] = encoding[i].roll(roll_amount)
    return new_encoding