code: def test_chain():
      def fn(x):
          for i in range(10):
              x = ops.mul(x, x)
          return x
  
      data = dict(x=randn(4))
      check_tracer(fn, data)
  
imports: from collections import OrderedDict
  import pytest
  import funsor.ops
  from funsor.domains import Real, Reals
  from funsor.gaussian import Gaussian
  from funsor.interpretations import reflect
  from funsor.interpreter import reinterpret
  from funsor.op_factory import make_op
  from funsor.ops.tracer import trace_function
  from funsor.optimizer import apply_optimizer
  from funsor.sum_product import sum_product
  from funsor.tensor import Tensor
  from funsor.terms import to_data, to_funsor
  from funsor.testing import assert_close, randn
label_desc: Use image node_id 3 for calling a global function with example usage: test_chain() and returns: x