def run(cmd, data=None, checks=None, region=None, log_error=True,<EOL>log_stdout=False):
try:<EOL><INDENT>logger.debug("<STR_LIT:U+0020>".join(str(x) for x in cmd) if not isinstance(cmd, basestring) else cmd)<EOL>_do_run(cmd, checks, log_stdout)<EOL><DEDENT>except:<EOL><INDENT>if log_error:<EOL><INDENT>logger.info("<STR_LIT>")<EOL><DEDENT>raise<EOL><DEDENT>
Run the provided command, logging details and checking for errors.