code: def test_transform_op_gc(dist):
      t = dist.transforms.PowerTransform(0.5)
      op = ops.WrappedTransformOp(fn=t)
      op_set = weakref.WeakSet()
      op_set.add(op)
      assert len(op_set) == 1
      del op
      assert len(op_set) == 0
  
file_path: funsor/test/test_ops.py
imports: import weakref
  import pytest
  from funsor import ops
  from funsor.distribution import BACKEND_TO_DISTRIBUTIONS_BACKEND
  from funsor.ops.builtin import parse_ellipsis, parse_slice
  from funsor.testing import desugar_getitem
  from funsor.util import get_backend
label_desc: Use image node_id 3 for calling a global function with example usage: test_transform_op_gc(dist) without return types