class_docstr: Base class for transformations which examine tokens.
  
  Special syntax should not be transformed when it occurs inside strings or
  comments. This is hard to reliably avoid with regexes. The solution is to
  tokenise the code as Python, and recognise the special syntax in the tokens.
  
  IPython's special syntax is not valid Python syntax, so tokenising may go
  wrong after the special syntax starts. These classes therefore find and
  transform *one* instance of special syntax at a time into regular Python
  syntax. After each transformation, tokens are regenerated to find the next
  piece of special syntax.
  
  Subclasses need to implement one class method (find)
  and one regular method (transform).
  
  The priority attribute can select which transformation to apply if multiple
  transformers match in the same place. Lower numbers have higher priority.
  This allows "%magic?" to be turned into a help call rather than a magic call.
class_docstr_tok: ["Base","class","for","transformations","which","examine","tokens",".","Special","syntax","should","not","be","transformed","when","it","occurs","inside","strings","or","comments",".","This","is","hard","to","reliably","avoid","with","regexes",".","The","solution","is","to","tokenise","the","code","as","Python",",","and","recognise","the","special","syntax","in","the","tokens",".","IPython","'s","special","syntax","is","not","valid","Python","syntax",",","so","tokenising","may","go","wrong","after","the","special","syntax","starts",".","These","classes","therefore","find","and","transform","*","one","*","instance","of","special","syntax","at","a","time","into","regular","Python","syntax",".","After","each","transformation",",","tokens","are","regenerated","to","find","the","next","piece","of","special","syntax",".","Subclasses","need","to","implement","one","class","method","(","find",")","and","one","regular","method","(","transform",")",".","The","priority","attribute","can","select","which","transformation","to","apply","if","multiple","transformers","match","in","the","same","place",".","Lower","numbers","have","higher","priority",".","This","allows","``","%","magic","?","''","to","be","turned","into","a","help","call","rather","than","a","magic","call","."]
code: def sortby(self):
      return self.start_line, self.start_col, self.priority
  
imports: import ast
  from codeop import CommandCompiler, Compile
  import re
  import sys
  import tokenize
  from typing import List, Tuple, Optional, Any
  import warnings
  from IPython.utils import tokenutil
label_desc: Use image node_id 1 for calling the TokenTransformBase obj's underlying member method code with example usage: obj.sortby() and returns: self,  self,  self