<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_visa_library(specification):
 """Helper function to create a VISA library wrapper. In general, you should not use the function directly. The VISA library wrapper will be created automatically when you create a ResourceManager object. """


    if not specification:
        logger.debug('No visa library specified, trying to find alternatives.')
        try:
            specification = os.environ['PYVISA_LIBRARY']
        except KeyError:
            logger.debug('Environment variable PYVISA_LIBRARY is unset.')

    try:
        argument, wrapper = specification.split('@')
    except ValueError:
        argument = specification
        wrapper = None  # Flag that we need a fallback, but avoid nested exceptions
    if wrapper is None:
        if argument: # some filename given
            wrapper = 'ni'
        else:
            wrapper = _get_default_wrapper()

    cls = get_wrapper_class(wrapper)

    try:
        return cls(argument)
    except Exception as e:
        logger.debug('Could not open VISA wrapper %s: %s\n%s', cls, str(argument), e)
        raise