TypeError (Missing required positional argument) when using py_function
Hi @antoche ,

Thanks for reporting. The issue exists in TF2.13v and got fixed in Tf2.14V onwards. Please refer to attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/1701a420793980bbda384b6a05815bcc/62180.ipynb).

Thank you! I'm getting the issue in 2.12.0 as well. When was it introduced? Is there a workaround? Hi @antoche ,

As per this [commit](https://github.com/tensorflow/tensorflow/commit/d765c6c264d1372a36e2da5b22621f0381f66930), `py_function` was made to use as decorator from Tf2.14 onwards.Not sure this is a feature implemented in Tf2.14 onwards.

Please use TF>=2.14 versions to avoid this error.  This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62180">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62180">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

v2.13.0-rc2-7-g1cb1a030a62

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Simply running the example from the py_function docs (https://www.tensorflow.org/api_docs/python/tf/py_function) results in a TypeError.

I am seeing this on my local install but also in a fresh colab notebook, so I don't think it's anything to do with my installation.

I am seeing similar behaviour with `numpy_function`, and when trying to use `py_function` in the other ways described in the docs

I would expect the snippet to run without exceptions.

I can't find any way of using `py_function`, or any workarounds.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/1o-VtzDgEm6kNm9mOqojHSd03FlIMg9AL?usp=sharing

@tf.py_function(Tout=tf.float32)
def py_log_huber(x, m):
  print('Running with eager execution.')
  if tf.abs(x) <= m:
    return x**2
  else:
    return m**2 * (1 - 2 * tf.math.log(m) + tf.math.log(x**2))
```


### Relevant log output

```shell
Traceback (most recent call last)
[<ipython-input-2-aea281a2ba70>](https://localhost:8080/#) in <cell line: 2>()
      1 import tensorflow as tf
----> 2 @tf.py_function(Tout=tf.float32)
      3 def py_log_huber(x, m):
      4   print('Running with eager execution.')
      5   if tf.abs(x) <= m:

1 frames
[/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/dispatch.py](https://localhost:8080/#) in op_dispatch_handler(*args, **kwargs)
   1168         if iterable_params is not None:
   1169           args, kwargs = replace_iterable_params(args, kwargs, iterable_params)
-> 1170         result = api_dispatcher.Dispatch(args, kwargs)
   1171         if result is not NotImplemented:
   1172           return result

TypeError: Missing required positional argument
```
