assert_shapes does not return anything and cannot be used as control dependency
@javidcf Could you please have a look at [this](https://github.com/tensorflow/tensorflow/commit/11fc1489d01822a2e728103c3af998976b4e7cd1) commit and the similar [issue](https://github.com/tensorflow/tensorflow/issues/36268)?
Please let me know if that helps?
Thank you! @sushreebarsa Thank you for your comment. I do not think that is the same issue, though. As far as I can tell, `assert_shapes_v2` still returns nothing (`None`) in the updated version, so the issue (`Can not convert a NoneType into a Tensor or Operation`) would still remain. @javidcf Thank you for the response!
@sachinprasadhs I was able to replicate this issue on colab using TF [v2.13](https://colab.research.google.com/gist/sushreebarsa/c3ac3eb222690fcad0995228f8776ac1/61163.ipynb#scrollTo=DJdrqrY_gvhv) and tf-[nightly](https://colab.research.google.com/gist/sushreebarsa/d248f16d897678e057daa3fbd308bcdf/61163.ipynb#scrollTo=DJdrqrY_gvhv). Please find the attached gists. Thank you! 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/61163">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/61163">No</a>

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

2.14.0-dev20230606

### Custom code

Yes

### OS platform and distribution

Windows 11 x64

### Mobile device

NA

### Python version

3.10

### Bazel version

NA

### GCC/compiler version

NA

### CUDA/cuDNN version

NA

### GPU model and memory

NA

### Current behavior?

Calling `tf.debugging.assert_shapes(...)` does not return anything. As a consequence, unlike other assert operations, trying to use this assert as a control dependency with `tf.control_dependencies` in graph mode fails with `TypeError: Can not convert a NoneType into a Tensor or Operation`.

Presumably, this would be fixed by simply adding a `return` before the call to `assert_shapes` in `assert_shapes_v2` in [`tensorflow/python/ops/check_ops.py`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/check_ops.py). But I'd rather someone familiar with the code to judge whether that is fine orif maybe there is was a reason why this op is not returned.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

@tf.function
def my_func(x):
    with tf.control_dependencies([tf.debugging.assert_shapes([(x, (2,))])]):
        return x + 2

my_func([1, 2])
# TypeError: Can not convert a NoneType into a Tensor or Operation.
```


### Relevant log output

```shell
(...) my_func  *
    with tf.control_dependencies([tf.debugging.assert_shapes([(x, (2,))])]):
(...)\site-packages\tensorflow\python\framework\ops.py:5359 control_dependencies
    return get_default_graph().control_dependencies(control_inputs)
(...)\site-packages\tensorflow\python\framework\func_graph.py:362 control_dependencies
    return super(FuncGraph, self).control_dependencies(filtered_control_inputs)
(...)\site-packages\tensorflow\python\framework\ops.py:4815 control_dependencies
    c = self.as_graph_element(c)
(...)\site-packages\tensorflow\python\framework\ops.py:3726 as_graph_element
    return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
(...)\site-packages\tensorflow\python\framework\ops.py:3815 _as_graph_element_locked
    (type(obj).__name__, types_str))

TypeError: Can not convert a NoneType into a Tensor or Operation.
```
