def auth_provider_if_configured(config):
    if config.has_option('server', 'cassandra_user') and config.has_option('server', 'cassandra_password'):
        from cassandra.auth import PlainTextAuthProvider
        return PlainTextAuthProvider(username=config.get('server', 'cassandra_user'), password=config.get('server', 'cassandra_password'))
    return None
dataset/ETHPy150Open datastax/cstar_perf/frontend/cstar_perf/frontend/lib/util.py/auth_provider_if_configured/original