def s(command, verbose=False, fail_fast=True, interactive=False):
completed_process = None<EOL>output = None<EOL>if interactive:<EOL><INDENT>completed_process = subprocess.run(<EOL>command,<EOL>shell=True,<EOL>stdin=sys.stdin,<EOL>stdout=sys.stdout,<EOL>stderr=sys.stderr,<EOL>)<EOL>output = {<EOL>"<STR_LIT>": completed_process.returncode,<EOL>}<EOL><DEDENT>else:<EOL><INDENT>completed_process = subprocess.run(<EOL>command,<EOL>shell=True,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>)<EOL>output = {<EOL>"<STR_LIT>": completed_process.returncode,<EOL>"<STR_LIT>": completed_process.stdout.decode('<STR_LIT:utf-8>'),<EOL>"<STR_LIT>": completed_process.stderr.decode('<STR_LIT:utf-8>'),<EOL>}<EOL><DEDENT>result = None<EOL>if completed_process.returncode == <NUM_LIT:0>:<EOL><INDENT>result = cmn.OkResult(output)<EOL><DEDENT>else:<EOL><INDENT>result = cmn.ErrorResult(output)<EOL><DEDENT>fail = fail_fast and not result.ok<EOL>if verbose or fail:<EOL><INDENT>cmn.logger.log(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>command=command,<EOL>**result.value<EOL>)<EOL>)<EOL><DEDENT>if (verbose or fail) and not interactive:<EOL><INDENT>cmn.logger.log(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>**result.value<EOL>)<EOL>)<EOL><DEDENT>if fail:<EOL><INDENT>cmn.fail("<STR_LIT>".format(command=command))<EOL><DEDENT>return result<EOL>
Run a shell command.