code: def variable_used(node: parser.InstDef, name: str) -> bool:
      """Determine whether a variable with a given name is used in a node."""
      return any(
          token.kind == "IDENTIFIER" and token.text == name
          for token in node.tokens
      )
  
imports: from dataclasses import dataclass, field
  import lexer
  import parser
  from typing import Optional
label_desc: Use image node_id 6 for calling a global function with example usage: variable_used(node, name) and returns: any