code: def do_one(*rules: Callable[[_T], _T]) -> Callable[[_T], _T]:
      """Try each of the rules until one works. Then stop."""
  
      def do_one_rl(expr: _T) -> _T:
          for rl in rules:
              result = rl(expr)
              if result != expr:
                  return result
          return expr
  
      return do_one_rl
  
file_path: sympy/sympy/strategies/core.py
imports: from __future__ import annotations
  from collections.abc import Callable, Mapping
  from typing import TypeVar
  from sys import stdout
label_desc: Use image node_id 9 for calling a global function with example usage: do_one() and returns: do_one_rl, expr, result