code: def test_run_exception_in_completed_event_is_caught(run):
      observer = run.observers[0]
      observer2 = mock.Mock(priority=20)
      run.observers.append(observer2)
      observer.completed_event.side_effect = TypeError
      run()
      assert observer.completed_event.called
      assert observer2.completed_event.called
  
imports: from datetime import datetime
  import mock
  import os
  import pytest
  import tempfile
  import sys
  from sacred.run import Run
  from sacred.config.config_summary import ConfigSummary
  from sacred.utils import ObserverError, SacredInterrupt, TimeoutInterrupt, apply_backspaces_and_linefeeds
label_desc: Use image node_id 16 for calling a global function with example usage: test_run_exception_in_completed_event_is_caught(run) without return types