class_docstr: Transformer for assignments from magics (a = %foo)
class_docstr_tok: ["Transformer","for","assignments","from","magics","(","a","=","%","foo",")"]
docstr: Find the first magic assignment (a = %foo) in the cell.
          
docstr_tok: ["Find","the","first","magic","assignment","(","a","=","%","foo",")","in","the","cell","."]
code: def find(cls, tokens_by_line):
      """Find the first magic assignment (a = %foo) in the cell."""
      for line in tokens_by_line:
          assign_ix = _find_assign_op(line)
          if (
              (assign_ix is not None)
              and (len(line) >= assign_ix + 2)
              and (line[assign_ix + 1].string == "%")
              and (line[assign_ix + 2].type == tokenize.NAME)
          ):
              return cls(line[assign_ix + 1].start)
  
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 MagicAssign obj's underlying member method code with example usage: obj.find(cls, tokens_by_line) and returns: cls