from typing import List


def prepad(bits: List[int], to: int=32) -> List[int]:
    """
    Pads a list of bits to a certain length factor.

    Args:
        bits: (List[int]) The bits to pad.
        to: (int) The length factor to pad the bits with. If a 43-bit list is
            input and this parameter is left at default (32), the list will be
            padded out to the next factor of 32, which will be 64 in this case.

    Returns:
        (List[int]) The padded bits.

    """

    if to == 0: return bits

    rem = len(bits) % to
    if rem > 0:
        bits = [0]*(to-rem) + bits
    
    return bits