code: def test_null_safe():
      def rl(expr: int) -> int | None:
          if expr == 1:
              return 2
          return None
  
      safe_rl = null_safe(rl)
      assert rl(1) == safe_rl(1)
      assert rl(3) is None
      assert safe_rl(3) == 3
  
file_path: sympy/sympy/strategies/tests/test_core.py
imports: from __future__ import annotations
  from sympy.core.singleton import S
  from sympy.core.basic import Basic
  from sympy.strategies.core import null_safe, exhaust, memoize, condition, chain, tryit, do_one, debug, switch, minimize
  from io import StringIO
label_desc: Use image node_id 4 for calling a global function with example usage: test_null_safe() and returns: None, int