code: def binary_function(symfunc, expr, **kwargs):
      """Returns a SymPy function with expr as binary implementation
  
      This is a convenience function that automates the steps needed to
      autowrap the SymPy expression and attaching it to a Function object
      with implemented_function().
  
      Parameters
      ==========
  
      symfunc : SymPy Function
          The function to bind the callable to.
      expr : SymPy Expression
          The expression used to generate the function.
      kwargs : dict
          Any kwargs accepted by autowrap.
  
      Examples
      ========
  
      >>> from sympy.abc import x, y
      >>> from sympy.utilities.autowrap import binary_function
      >>> expr = ((x - y)**(25)).expand()
      >>> f = binary_function('f', expr)
      >>> type(f)
      <class 'sympy.core.function.UndefinedFunction'>
      >>> 2*f(x, y)
      2*f(x, y)
      >>> f(x, y).evalf(2, subs={x: 1, y: 2})
      -1.0
  
      """
      binary = autowrap(expr, **kwargs)
      return implemented_function(symfunc, binary)
  
imports: import sys
  import os
  import shutil
  import tempfile
  from subprocess import STDOUT, CalledProcessError, check_output
  from string import Template
  from warnings import warn
  from sympy.core.cache import cacheit
  from sympy.core.function import Lambda
  from sympy.core.relational import Eq
  from sympy.core.symbol import Dummy, Symbol
  from sympy.tensor.indexed import Idx, IndexedBase
  from sympy.utilities.codegen import make_routine, get_code_generator, OutputArgument, InOutArgument, InputArgument, CodeGenArgumentListError, Result, ResultBase, C99CodeGen
  from sympy.utilities.iterables import iterable
  from sympy.utilities.lambdify import implemented_function
  from sympy.utilities.decorator import doctest_depends_on
label_desc: Use image node_id 4 for calling a global function with example usage: binary_function(symfunc, expr) and returns: implemented_function