def get_class_path(cls, use_tfds_prefix=True):
    """Returns path of given class or object. Eg: `tfds.image.cifar.Cifar10`."""
    if not isinstance(cls, type):
        cls = cls.__class__
    module_path = cls.__module__
    if use_tfds_prefix and module_path.startswith('tensorflow_datasets'):
        module_path = 'tfds' + module_path[len('tensorflow_datasets'):]
    return '.'.join([module_path, cls.__name__])