def validate_block(block):
if isinstance(block, str):<EOL><INDENT>if block not in BLOCK_TAGS:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>elif isinstance(block, int):<EOL><INDENT>block = hex(block)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return block<EOL>
Validate block on tag or hex int