def is_rpm_package_installed(pkg):
with settings(hide('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'),<EOL>warn_only=True, capture=True):<EOL><INDENT>result = sudo("<STR_LIT>" % pkg)<EOL>if result.return_code == <NUM_LIT:0>:<EOL><INDENT>return True<EOL><DEDENT>elif result.return_code == <NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>else:   <EOL><INDENT>print(result)<EOL>raise SystemExit()<EOL><DEDENT><DEDENT>
checks if a particular rpm package is installed