def _if_not_installed(pname):
    def argcatcher(func):
        functools.wraps(func)

        def decorator(*args, **kwargs):
            if _galaxy_tool_install(args):
                run_function = not _galaxy_tool_present(args)
            elif isinstance(pname, list):
                run_function = any([_executable_not_on_path(x) for x in pname])
            else:
                run_function = _executable_not_on_path(pname)
            if run_function:
                return func(*args, **kwargs)
        return decorator
    return argcatcher
Decorator that checks if a callable program is installed.
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_if_not_installed