def run_cmd()

in dev/merge_parquet_pr.py [0:0]


def run_cmd(cmd):
    try:
        if isinstance(cmd, list):
            return subprocess.check_output(cmd)
        else:
            return subprocess.check_output(cmd.split(" "))
    except subprocess.CalledProcessError as e:
        # this avoids hiding the stdout / stderr of failed processes
        print 'Command failed: %s' % cmd
        print 'With output:'
        print '--------------'
        print e.output
        print '--------------'
        raise e