Home / Function/ _with_nulled_run_id() — langchain Function Reference

_with_nulled_run_id() — langchain Function Reference

Architecture documentation for the _with_nulled_run_id() function in test_runnable_events_v2.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1["_with_nulled_run_id()"]
  33c02978_2077_5819_7048_bc2a81e80625["test_runnable_events_v2.py"]
  8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1 -->|defined in| 33c02978_2077_5819_7048_bc2a81e80625
  716d2a5e_dc8e_3cae_e044_b56b06bee655["_collect_events()"]
  716d2a5e_dc8e_3cae_e044_b56b06bee655 -->|calls| 8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1
  66b2db10_fe7c_963f_a210_927bdc661000["test_chain_ordering()"]
  66b2db10_fe7c_963f_a210_927bdc661000 -->|calls| 8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1
  418d7102_b1cb_dd18_6fdf_1ee533505cef["test_event_stream_with_retry()"]
  418d7102_b1cb_dd18_6fdf_1ee533505cef -->|calls| 8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1
  style 8e5f2701_6ca3_f1d9_98ad_ec0c5f691bf1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable_events_v2.py lines 60–75

def _with_nulled_run_id(events: Sequence[StreamEvent]) -> list[StreamEvent]:
    """Removes the run IDs from events."""
    for event in events:
        assert "run_id" in event, f"Event {event} does not have a run_id."
        assert "parent_ids" in event, f"Event {event} does not have parent_ids."
        assert isinstance(event["run_id"], str), (
            f"Event {event} run_id is not a string."
        )
        assert isinstance(event["parent_ids"], list), (
            f"Event {event} parent_ids is not a list."
        )

    return cast(
        "list[StreamEvent]",
        [{**event, "run_id": "", "parent_ids": []} for event in events],
    )

Domain

Subdomains

Frequently Asked Questions

What does _with_nulled_run_id() do?
_with_nulled_run_id() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable_events_v2.py.
Where is _with_nulled_run_id() defined?
_with_nulled_run_id() is defined in libs/core/tests/unit_tests/runnables/test_runnable_events_v2.py at line 60.
What calls _with_nulled_run_id()?
_with_nulled_run_id() is called by 3 function(s): _collect_events, test_chain_ordering, test_event_stream_with_retry.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free