code: def brute(tree, objective=identity, **kwargs):
      return lambda expr: min(
          tuple(allresults(tree, **kwargs)(expr)), key=objective
      )
  
file_path: sympy/sympy/strategies/tree.py
imports: from functools import partial
  from sympy.strategies import chain, minimize
  from sympy.strategies.core import identity
  import sympy.strategies.branch
  from sympy.strategies.branch import yieldify
label_desc: Use image node_id 4 for calling a global function with example usage: brute(tree, objective) and returns: function