import typing


def tag_code_serial_scanning(serial: str = None) -> typing.AnyStr:
    """
    serial code is 8 number serial,
    set 4 first numbers to 0
    """
    if len(str(serial)) == 4:
        scanned_serial = "0000" + str(serial)
    if len(str(serial)) == 5:
        scanned_serial = "000" + str(serial)
    if len(str(serial)) == 6:
        scanned_serial = "00" + str(serial)
    if len(str(serial)) == 7:
        scanned_serial = "0" + str(serial)
    else:
        pass
    return scanned_serial

