from typing import List


def add_padding(code: List[List[int]], width:int=4) -> List[List[int]]:
    """Add ``width`` number of blocks of padding to the code

    :param code: The qrcode on/off image
    :param width: The amount of padding to add
    """
    # add four to the left and right
    lr_padding = [0] * width
    top_padding = [0] * (len(code[0]) + (width*2))

    res = []
    # add top padding
    for _ in range(width):
        res.append(top_padding)

    for row in code:
        res.append(lr_padding + row + lr_padding)

    # add bottom padding
    for _ in range(width):
        res.append(top_padding)

    return res