code: def test_rebuild(st: ShapeTracker):
      rebuilt_st = make_scratch_st(st)
      mops = to_movement_ops(st)
      c[len(mops)] += 1
      for mop_arg in mops:
          rebuilt_st = apply_mop(rebuilt_st, mop_arg)
      rebuilt_st = rebuilt_st.simplify()
      assert st_equivalent(st, rebuilt_st)
      last_v1 = st.views[-1]
      last_v2 = rebuilt_st.views[-1]
      assert (
          last_v1.shape == last_v2.shape
      ), f"{last_v1.shape} != {last_v2.shape}"
  
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 7 for calling a global function with example usage: test_rebuild(st) without return types