def check_composite_tokens(self, name, tokens):
assert len(tokens) >= <NUM_LIT:2><EOL>key = tokens[<NUM_LIT:0>]<EOL>assert key.value.lower() == name<EOL>assert tokens[-<NUM_LIT:1>].value.lower() == "<STR_LIT:end>"<EOL>if len(tokens) == <NUM_LIT:2>:<EOL><INDENT>body = []  <EOL><DEDENT>else:<EOL><INDENT>body = tokens[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL><DEDENT>body_tokens = []<EOL>for t in body:<EOL><INDENT>if isinstance(t, dict):<EOL><INDENT>body_tokens.append(t["<STR_LIT>"])<EOL><DEDENT>else:<EOL><INDENT>body_tokens.append(t)<EOL><DEDENT><DEDENT>return key, body_tokens<EOL>
Return the key and contents of a KEY..END block
for PATTERN, POINTS, and PROJECTION