def has_command(command):
    stdout, _, return_code = run('which {}'.format(command), should_return_returncode=True)
    return len(stdout) != 0 and return_code == 0
test wheather a command exists in current $PATH or not.
dataset/ETHPy150Open sodastsai/taskr/taskr/contrib/system/__init__.py/has_command