code: def _smallest_matrix_subexpr(t, nodes) -> bool:
      if t is None:
          return False  # prevent buggy code from causing us to fail
      if (
          isinstance(t, tsensor.ast.Member)
          and isinstance(t.obj, tsensor.ast.Atom)
          and isinstance(t.member, tsensor.ast.Atom)
          and str(t.member) == "T"
      ):
          nodes.append(t)
          return True
      if len(t.kids) == 0:  # leaf node
          if istensor(t.value):
              nodes.append(t)
          return istensor(t.value)
      n_matrix_below = 0  # once this latches true, it's passed all the way up to the root
      for sub in t.kids:
          matrix_below = _smallest_matrix_subexpr(sub, nodes)
          n_matrix_below += matrix_below  # how many descendents evaluated two non-scalar?
      # If current node is matrix and no descendents are, then this is smallest
      # sub expression that evaluates to a matrix; keep track
      if istensor(t.value) and n_matrix_below == 0:
          nodes.append(t)
      # Report to caller that this node or some descendent is a matrix
      return istensor(t.value) or n_matrix_below > 0
  
imports: import os
  import sys
  import traceback
  import inspect
  import hashlib
  from pathlib import Path
  import matplotlib.pyplot
  import tsensor
label_desc: Use image node_id 7 for calling a global function with example usage: _smallest_matrix_subexpr(t, nodes) and returns: unknown, False, True, istensor