# Buggy code
def get_driver(
    cog_name: str, identifier: str, storage_type: Optional[BackendType] = None, **kwargs
):
    """Get a driver instance.

    Parameters
    ----------
    cog_name : str
        The cog's name.
    identifier : str
        The cog's discriminator.
    storage_type : Optional[BackendType]
        The backend you want a driver for. Omit to try to obtain the
        backend from data manager.
    **kwargs
        Driver-specific keyword arguments.

    Returns
    -------
    BaseDriver
        A driver instance.

    Raises
    ------
    RuntimeError
        If the storage type is MongoV1, Mongo, or invalid.

    """
    if storage_type is None:
        try:
            storage_type = BackendType(data_manager.storage_type())
        except RuntimeError:
            storage_type = BackendType.JSON

    try:
        driver_cls: Type[BaseDriver] = get_driver_class(storage_type)
    except ValueError:
        if storage_type in (BackendType.MONGOV1, BackendType.MONGO):
            raise RuntimeError(
                "Please convert to JSON first to continue using the bot."
                "Mongo support was removed in 3.2."
            ) from None
        else:
            raise RuntimeError(f"Invalid driver type: '{storage_type}'") from None
    return driver_cls(cog_name, identifier, **kwargs)


# Traceback (RuntimeError)
Traceback (most recent call last):
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/bin/redbot-setup", line 8, in <module>
sys.exit(run_cli())
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 429, in run_cli
cli()  # pylint: disable=no-value-for-parameter  # click
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 398, in convert
new_storage_details = loop.run_until_complete(do_migration(current_backend, target))
File "/home/zephyrkul/.pyenv/versions/3.8.1/lib/python3.8/asyncio/base_events.py", line 612, in run_until_complete
return future.result()
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 210, in do_migration
await config.migrate(cur_driver_cls, new_driver_cls)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 1460, in migrate
core_conf = Config.get_core_conf()
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 708, in get_core_conf
return cls.get_conf(
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 683, in get_conf
driver = get_driver(cog_name, uuid)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/drivers/__init__.py", line 113, in get_driver
raise RuntimeError(
RuntimeError: Please convert to JSON first to continue using the bot.Mongo support was removed in 3.2.

# Fixed code
def get_driver(
    cog_name: str,
    identifier: str,
    storage_type: Optional[BackendType] = None,
    *,
    allow_old: bool = False,
    **kwargs,
):
    """Get a driver instance.

    Parameters
    ----------
    cog_name : str
        The cog's name.
    identifier : str
        The cog's discriminator.
    storage_type : Optional[BackendType]
        The backend you want a driver for. Omit to try to obtain the
        backend from data manager.
    **kwargs
        Driver-specific keyword arguments.

    Returns
    -------
    BaseDriver
        A driver instance.

    Raises
    ------
    RuntimeError
        If the storage type is MongoV1, Mongo, or invalid.

    """
    if storage_type is None:
        try:
            storage_type = BackendType(data_manager.storage_type())
        except RuntimeError:
            storage_type = BackendType.JSON

    try:
        if not allow_old:
            driver_cls: Type[BaseDriver] = get_driver_class(storage_type)
        else:
            driver_cls: Type[BaseDriver] = _get_driver_class_include_old(storage_type)
    except ValueError:
        if storage_type in (BackendType.MONGOV1, BackendType.MONGO):
            raise RuntimeError(
                "Please convert to JSON first to continue using the bot."
                "Mongo support was removed in 3.2."
            ) from None
        else:
            raise RuntimeError(f"Invalid driver type: '{storage_type}'") from None
    return driver_cls(cog_name, identifier, **kwargs)