Is flag attribute available in TF-2.12.0?
Apparently, I have to replace `flags = tf.flags` with `flags = tf.compat.v1.flags`.

Hi,
I am working with the Bert training model, I faced the following error:
```
$ python3 create_pretraining_data.py --input_file=results/part-00000-of-00500   --output_file=tfrecord/part-00000-of-00500 --vocab_file=wiki/vocab.txt    --do_lower_case=True    --max_seq_length=512    --max_predictions_per_seq=76    --masked_lm_prob=0.15    --random_seed=12345    --dupe_factor=10
Traceback (most recent call last):
  File "create_pretraining_data.py", line 9, in <module>
    import tokenization
  File "/disk1/training/language_model/tensorflow/bert/cleanup_scripts/tokenization.py", line 13, in <module>
    import tensorflow.compat.v1 as tf
ModuleNotFoundError: No module named 'tensorflow'
```
Then I searched for available TF versions and installed the latest one:
```
$ pip index versions tensorflow
Available versions: 2.12.0, 2.11.1, 2.11.0, 2.10.1, 2.10.0, 2.9.3, 2.9.2, 2.9.1, 2.9.0, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7.0, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.4, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.3, 2.2.2, 2.2.1, 2.2.0
$ pip install --user tensorflow
Collecting tensorflow
  Downloading tensorflow-2.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (585.9 MB)
...
Successfully installed absl-py-1.4.0 flatbuffers-23.3.3 google-auth-2.17.3 google-auth-oauthlib-1.0.0 grpcio-1.54.0 jax-0.4.8 keras-2.12.0 libclang-16.0.0 ml-dtypes-0.1.0 numpy-1.23.5 protobuf-4.22.3 scipy-1.10.1 tensorboard-2.12.2 tensorboard-data-server-0.7.0 tensorboard-plugin-wit-1.8.1 tensorflow-2.12.0 tensorflow-estimator-2.12.0 tensorflow-io-gcs-filesystem-0.32.0
```

I reran the command again and now see this error

```
$ python3 create_pretraining_data.py --input_file=results/part-00000-of-00500   --output_file=tfrecord/part-00000-of-00500 --vocab_file=wiki/vocab.txt    --do_lower_case=True    --max_seq_length=512    --max_predictions_per_seq=76    --masked_lm_prob=0.15    --random_seed=12345    --dupe_factor=10
2023-05-02 12:13:34.171692: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-02 12:13:34.670262: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
  File "create_pretraining_data.py", line 12, in <module>
    flags = tf.flags
AttributeError: module 'tensorflow' has no attribute 'flags'
```


I am confused with the tensorflow versions and based on my searches, the `flag` is not available in TF-2.12.0. I am not sure though. Any idea about that?