def __virtual__():
    '''
    Only load if mercurial is available
    '''
    if __opts__['fileserver_backend'] not in __virtualname__:
        return False
    if not HAS_HG:
        log.error('Mercurial fileserver backend is enabled in configuration '
                  'but could not be loaded, is hglib installed?')
        return False
    if __opts__['hgfs_branch_method'] not in VALID_BRANCH_METHODS:
        log.error(
            'Invalid hgfs_branch_method \'{0}\'. Valid methods are: {1}'
            .format(__opts__['hgfs_branch_method'], VALID_BRANCH_METHODS)
        )
        return False
    return __virtualname__
dataset/ETHPy150Open saltstack/salt/salt/fileserver/hgfs.py/__virtual__/swapped operands of `not in`