<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_access_info(self, instance, db_key, db_name=None):
        ''' Convenience method to extract info from instance
        '''
        dsn = instance.get('dsn')
        host = instance.get('host')
        username = instance.get('username')
        password = instance.get('password')
        database = instance.get(db_key) if db_name is None else db_name
        driver = instance.get('driver')
        if not dsn:
            if not host:
                host = '127.0.0.1,1433'
            if not database:
                database = self.DEFAULT_DATABASE
            if not driver:
                driver = self.DEFAULT_DRIVER
        return dsn, host, username, password, database, driver