code: def require(self, kind: str) -> Token:
      # Return next token and advance position, requiring kind to match
      tkn = self.next()
      if tkn is not None and tkn.kind == kind:
          return tkn
      raise self.make_syntax_error(
          f"Expected {kind!r} but got {tkn and tkn.text!r}", tkn
      )
  
file_path: cpython/Tools/cases_generator/plexer.py
imports: import lexer
label_desc: Use image node_id 10 for calling the PLexer obj's underlying member method code with example usage: obj.require(kind) and returns: tkn