def METHOD_NAME(args):
    """
    Runs a shell command while logging both standard output and standard error.
    An earlier version of this function that used Popen.stdout.readline()
    was failing intermittently in CI, so now we're trying this version that
    uses Popen.communicate().
    """
    try:
        proc = subprocess.Popen(args,
                                stdout=subprocess.PIPE,
                                stderr=subprocess.STDOUT,
                                universal_newlines=True)
        out = proc.communicate()[0]
        print(out, end='')
        if proc.returncode != 0:
            msg = " ".join(args)
            print(f"Error executing command '{msg}'")
            return False
        else:
            return True
    except (subprocess.CalledProcessError, OSError) as err:
        msg = " ".join(args)
        print(f"Error executing command '{msg}'\n{err}")
        return False