def execute_command(command):
command = shlex.split(command)<EOL>try:<EOL><INDENT>process = subprocess.Popen(<EOL>command,<EOL>stdin=subprocess.PIPE,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>)<EOL><DEDENT>except FileNotFoundError:<EOL><INDENT>raise RuntimeError("<STR_LIT>".format(repr(command)))<EOL><DEDENT>process.wait()<EOL>if process.returncode > <NUM_LIT:0>:<EOL><INDENT>stderr = process.stderr.read().decode("<STR_LIT:utf-8>")<EOL>raise ValueError("<STR_LIT>".format(repr(stderr)))<EOL><DEDENT>return process.stdout.read().decode("<STR_LIT:utf-8>")<EOL>
Execute a command and return its output