code: def parse_mul_tree(root):
      """
      Parse a tree of multiplications starting at the given root.
  
      Parameters
      ----------
      root
          The variable at the root of the tree.
  
      Returns
      -------
      object
          A tree where each non-leaf node corresponds to a multiplication
          in the computation of `root`, represented by the list of its inputs.
          Each input is a pair [n, x] with `n` a boolean value indicating whether
          sub-tree `x` should be negated.
  
      Examples
      --------
          x * y               -> [False, [[False, x], [False, y]]]
          -(x * y)            -> [True, [[False, x], [False, y]]]
          -x * y              -> [False, [[True, x], [False, y]]]
          -x                  -> [True, x]
          (x * y) * -z        -> [False, [[False, [[False, x], [False, y]]],
                                          [True, z]]]
  
      """
      # Is it a multiplication?
      mul_info = is_mul(root)
      if mul_info is None:
          # Is it a negation?
          neg_info = is_neg(root)
          if neg_info is None:
              # Keep the root "as is".
              return [False, root]
          else:
              # Recurse, inverting the negation.
              neg, sub_tree = parse_mul_tree(neg_info)
              return [not neg, sub_tree]
      else:
          # Recurse into inputs.
          return [False, list(map(parse_mul_tree, mul_info))]
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import numpy
  import theano
  from theano import config, gof, printing, scalar
  from theano.compat import imap
  from theano.printing import pprint
  from theano.tensor import basic
  from theano.tensor import elemwise, opt, NotScalarConstantError
  from theano.tensor.type import values_eq_approx_remove_inf
  from theano.gof.opt import copy_stack_trace
label_desc: Use image node_id 12 for calling a global function with example usage: parse_mul_tree(root) and returns: list, list, list