def METHOD_NAME(caplog, capsys):
    @task(log_prints=False)
    def test_task():
        task_run_name = get_run_context().task_run.name
        print(f"test print from {task_run_name}")
        return task_run_name
    @flow(log_prints=True)
    def parent_flow():
        return test_task()
    printing_task_name = parent_flow()
    assert f"test print from {printing_task_name}" not in caplog.text
    assert f"test print from {printing_task_name}" in capsys.readouterr().out