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