code: def mongo_obs(monkeypatch):
      client = ReconnectingMongoClient(
          max_calls_before_reconnect=10,
          max_calls_before_failure=1,
          exception_to_raise=pymongo.errors.ServerSelectionTimeoutError,
      )
      fs = gridfs.GridFS(client.sacred)
      monkeypatch.setattr(
          pymongo, "MongoClient", lambda *args, **kwargs: client
      )
      monkeypatch.setattr(gridfs, "GridFS", lambda _: fs)
  
      return QueuedMongoObserver(interval=0.01, retry_interval=0.01)
  
imports: import datetime
  from sacred.observers.queue import QueueObserver
  import mock
  import pytest
  import sys
  from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics
  import gridfs
  from mongomock.gridfs import enable_gridfs_integration
  import pymongo.errors
  from sacred.dependencies import get_digest
  from sacred.observers.mongo import QueuedMongoObserver, MongoObserver, QueueCompatibleMongoObserver
  from .failing_mongo_mock import ReconnectingMongoClient
label_desc: Use image node_id 1 for calling a global function with example usage: mongo_obs(monkeypatch) and returns: QueuedMongoObserver