code: def assert_history(
      relay_server, run, publish_util, dropped=None, inject=None
  ):
      with relay_server(inject=inject) as relay:
          history = generate_history()
          publish_util(run=run, history=history)
  
      context_history = relay.context.get_run_history(
          run.id, include_private=True
      )
      context_history.drop(columns=["__run_id"], inplace=True)
  
      converted_history = convert_history(history)
      assert (
          context_history.to_dict(orient="records") == converted_history
      )
  
      if dropped is not None:
          assert (
              sum(relay.context.entries.get(run.id)["dropped"])
              == dropped
          )
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_file_stream_internal.py
imports: import json
  import unittest.mock
  import pytest
  import wandb
label_desc: Use image node_id 3 for calling a global function with example usage: assert_history(relay_server, run, publish_util, dropped, inject) without return types