def custom_parser(cards: list, parser: Optional[Callable[[list], Optional[list]]]=None) -> Optional[list]:
    '''parser for CUSTOM [1] issue mode,
    please provide your custom parser as argument'''

    if not parser:
        return cards

    else:
        return parser(cards)
def custom_parser ( cards : list , parser : Optional [ Callable [ [ list ] , Optional [ list ] ] ] = None ) -> Optional [ list ] : if not parser : return cards else : return parser ( cards )
parser for CUSTOM [1] issue mode,
    please provide your custom parser as argument