def METHOD_NAME():
    @op(out=DynamicOut())
    def dynamic_add(_, x):
        yield DynamicOutput(x + 1, mapping_key="1")
        yield DynamicOutput(x + 2, mapping_key="2")
    @job
    def _is_fine_1():
        def _add(item):
            dynamic_add(item)
        dynamic_op().map(_add)
    with pytest.raises(
        DagsterInvalidDefinitionError,
        match="cannot be downstream of more than one dynamic output",
    ):
        @job
        def _should_fail():
            def _add_echo(item):
                dynamic_add(item).map(echo)
            dynamic_op().map(_add_echo)
    @job
    def _is_fine_2():
        dynamic_op().map(dynamic_add)
    with pytest.raises(
        DagsterInvalidDefinitionError,
        match="cannot be downstream of more than one dynamic output",
    ):
        @job
        def _should_fail():
            echo(dynamic_op().map(dynamic_add).collect())