See documentation for py_func and eager_py_func.
(func,
inp,
Tout,
stateful=None,
eager=False,
is_grad_func=False,
name=None)