<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dbapi(conf=cfg.CONF):
 """Retrieves an instance of the configured database API. :param oslo_config.cfg.ConfigOpts conf: an instance of the configuration file :return: database API instance :rtype: :class:`~tvrenamer.cache.api.DatabaseAPI` """

    global _DBAPI

    if _DBAPI is None:
        _DBAPI = api.DatabaseAPI(conf)
    return _DBAPI