def frag_check(*args, protocol, func=None):
func = func or inspect.stack()[<NUM_LIT:2>][<NUM_LIT:3>]<EOL>if '<STR_LIT>' in protocol:<EOL><INDENT>_ip_frag_check(*args, func=func)<EOL><DEDENT>elif '<STR_LIT>' in protocol:<EOL><INDENT>_tcp_frag_check(*args, func=func)<EOL><DEDENT>else:<EOL><INDENT>raise FragmentError(f'<STR_LIT>')<EOL><DEDENT>
Check if arguments are valid fragments.