def execute(cmd, fail_ok=False, merge_stderr=False):
    cmdlist = shlex.split(cmd)
    result = ''
    result_err = ''
    stdout = subprocess.PIPE
    stderr = subprocess.STDOUT if merge_stderr else subprocess.PIPE
    proc = subprocess.Popen(cmdlist, stdout=stdout, stderr=stderr)
    result, result_err = proc.communicate()
    result = result.decode('utf-8')
    if not fail_ok and proc.returncode != 0:
        raise exceptions.CommandFailed(proc.returncode, cmd, result,
                                       result_err)
    return result
Filter out all statements that are not in response to another statement.
dataset/ETHPy150Open dtroyer/python-openstackclient/functional/common/test.py/execute--crossover with--dataset/ETHPy150Open gunthercox/ChatterBot/chatterbot/conversation/utils.py/get_response_statements