code: def test_simple():
      rl = rewriterule(Basic(p, S(1)), Basic(p, S(2)), variables=(p,))
      assert list(rl(Basic(S(3), S(1)))) == [Basic(S(3), S(2))]
  
      p1 = p**2
      p2 = p**3
      rl = rewriterule(p1, p2, variables=(p,))
  
      expr = x**2
      assert list(rl(expr)) == [x**3]
  
file_path: sympy/sympy/unify/tests/test_rewrite.py
imports: from sympy.unify.rewrite import rewriterule
  from sympy.core.basic import Basic
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.elementary.trigonometric import sin
  from sympy.abc import x, y
  from sympy.strategies.rl import rebuild
  from sympy.assumptions import Q
label_desc: Use image node_id 1 for calling a global function with example usage: test_simple() without return types