code: def st_equivalent(st1: ShapeTracker, st2: ShapeTracker):
      if (idxs1 := st1.expr_idxs()) == (idxs2 := st2.expr_idxs()):
          return True
      idx1, valid1 = idxs1
      idx2, valid2 = idxs2
      # always invalid
      if valid1 == 0 and valid2 == 0:
          return True
  
      var1 = idx1.vars() | valid1.vars()
      var2 = idx2.vars() | valid2.vars()
      # Maybe there are cases that vars are different yet the sts are the same?
      if var1 != var2:
          return False
  
      # brute force over the vars range
      vs = list(var1)
      for i, ranges in enumerate(
          itertools.product(*[range(v.min, v.max + 1) for v in vs])
      ):
          if i > 1000:
              print("WARNING: did not search all possible combinations")
              break
          var_vals = {k: v for k, v in zip(vs, ranges)}
          r1 = (
              sym_infer(idx1, var_vals)
              if sym_infer(valid1, var_vals)
              else 0
          )
          r2 = (
              sym_infer(idx2, var_vals)
              if sym_infer(valid2, var_vals)
              else 0
          )
          if r1 != r2:
              return False
  
      return True
  
file_path: tinygrad/extra/to_movement_ops.py
imports: from tqdm import tqdm
  import itertools
  from collections import defaultdict
  from typing import List, Tuple, DefaultDict
  from extra.optimization.helpers import load_worlds, ast_str_to_ast
  from tinygrad.ops import MovementOps, BufferOps, LazyOp
  from tinygrad.helpers import prod
  from tinygrad.shape.shapetracker import ShapeTracker
  from tinygrad.shape.symbolic import sym_infer, Node
label_desc: Use image node_id 6 for calling a global function with example usage: st_equivalent(st1, st2) and returns: True, True, True, False, False