Error in tensorflow_datasets

I am trying to create a custom tfds dataloader for my dataset.
On the line tfds.load('my_dataset'), I am encountering the following error:

AttributeError: Failed to encode example:
module 'tensorflow_datasets.core.utils.type_utils' has no attribute 'PathLikeCls'

How do I resolve this issue?

Can you try with the latest tensorflow_datasets 4.7.0 and if the issue continues please share minimal code to replicate the above issue? Thank you!