def METHOD_NAME(number, pad_bits=None):  # type: (int, int) -> bytes
    """
    Given a number, format as a little endian array of bytes
    """
    result = int_to_bytes(number)[::-1]  # type: bytes
    while pad_bits is not None and len(result) < (pad_bits // 8):
        result += b'\x00'
    return result