symfunc can be an UndefinedFunction instance, or a name string.
In the latter case we create an UndefinedFunction instance with that
name.

Be aware that this is a quick workaround, not a general method to create
special symbolic functions. If you want to create a symbolic function to be
used by all the machinery of sympy you should subclass the Function
class.

Parameters :

symfunc : str or UndefinedFunction instance

If str, then create new UndefinedFunction with this as
name. If \(symfunc\) is a sympy function, attach implementation to it.

If not specified differently by the user, SymPy functions are replaced as
far as possible by either python-math, numpy (if available) or mpmath
functions - exactly in this order. To change this behavior, the “modules”
argument can be used. It accepts:

the strings “math”, “mpmath”, “numpy”, “sympy”

any modules (e.g. math)

dictionaries that map names of sympy functions to arbitrary functions

lists that contain a mix of the arguments above, with higher priority
given to entries appearing first.

The default behavior is to substitute all arguments in the provided
expression with dummy symbols. This allows for applied functions (e.g.
f(t)) to be supplied as arguments. Call the function with dummify=False if
dummy substitution is unwanted.
If you want to view the lambdified function or provide “sympy” as the
module, you should probably set dummify=False.