def compare_token(expected: Union[str, bytes],<EOL>actual: Union[str, bytes]) -> bool:
expected = util.to_bytes(expected)<EOL>actual = util.to_bytes(actual)<EOL>_, expected_sig_seg = expected.rsplit(b'<STR_LIT:.>', <NUM_LIT:1>)<EOL>_, actual_sig_seg = actual.rsplit(b'<STR_LIT:.>', <NUM_LIT:1>)<EOL>expected_sig = util.b64_decode(expected_sig_seg)<EOL>actual_sig = util.b64_decode(actual_sig_seg)<EOL>return compare_signature(expected_sig, actual_sig)<EOL>
Compares the given tokens.

:param expected: The expected token.
:type expected: Union[str, bytes]
:param actual: The actual token.
:type actual: Union[str, bytes]
:return: Do the tokens match?
:rtype: bool