class_docstr: An AST (a tree) for a simple arithmetic expression.
docstr: Enumerate the locations of a variable in the expression tree.
  A location is a sequence of 0s and 1s, indicate over which
  argument you descent in the tree.
  For example, in (a + (b * c)), variable b has location [1, 0]
  (descent on args[1] on the + node, then take args[0]).
docstr_tok: ["Enumerate","the","locations","of","a","variable","in","the","expression","tree",".","A","location","is","a","sequence","of","0s","and","1s",",","indicate","over","which","argument","you","descent","in","the","tree",".","For","example",",","in","(","a","+","(","b","*","c",")",")",",","variable","b","has","location","[","1",",","0","]","(","descent","on","args","[","1","]","on","the","+","node",",","then","take","args","[","0","]",")","."]
code: def var_location(self, name, past=[]):
      """
      Enumerate the locations of a variable in the expression tree.
      A location is a sequence of 0s and 1s, indicate over which
      argument you descent in the tree.
      For example, in (a + (b * c)), variable b has location [1, 0]
      (descent on args[1] on the + node, then take args[0]).
      """
      for n in range(len(self.args)):
          arg = self.args[n]
  
          if isinstance(arg, Var):
              if arg.name == name:
                  yield past + [n]
          elif isinstance(arg, Expression):
              yield from arg.var_location(name, past + [n])
  
imports: import random
label_desc: Use image node_id 3 for calling the Expression obj's underlying member method code with example usage: obj.var_location(name, past) without return types