fix: minor change to unit validation in tf.keras.layers.Dense
It doesn't seem that this file follows python style guides as pylint and black were showing me suggested changes, do you usually run lint tests in your python files here or should I skip it? Thank you for the PR.

Unfortunately, you are touching Keras code, which I think now should be done in the Keras repositories https://github.com/keras-team/keras as Keras 3.0 is multiframework, not just a component of TF. Can you make a copy of this PR in that repository (and/or in https://github.com/keras-team/tf-keras) and then revisit this one once the Keras one(s) merge? Thank you

PS: We do have some linting done internally at Google, which will happen once the PR gets imported into the internal system (that's the TF configuration, unsure about the configuration on the Keras repositories) Hi @kiraksi This PR relates to the Keras component, it will be created in the github.com/keras-team/keras repository instead.  As @mihaimaruseac suggested, I can see you have created PR[#721](https://github.com/keras-team/tf-keras/pull/721) in the Keras repository.  Hence closing this PR. Thank you for your contribution! 
@fchollet, @qlzh727
Fixes: #62432 