code: def test_fs_observer_started_event_raises_file_exists_error(
      dir_obs, sample_run, monkeypatch
  ):
      """Assumes some problem with the filesystem exists
      therefore run dir creation should stop after some re-tries
      """
  
      def mkdir_raises_file_exists(name, mode=0o777):
          raise FileExistsError("File already exists: " + name)
  
      basedir, obs = dir_obs
      sample_run["_id"] = None
      with monkeypatch.context() as m:
          m.setattr("os.mkdir", mkdir_raises_file_exists)
          with pytest.raises(FileExistsError):
              obs.started_event(**sample_run)
  
imports: import datetime
  import os
  from copy import copy
  import pytest
  import json
  from pathlib import Path
  from sacred.observers.file_storage import FileStorageObserver
  from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics
label_desc: Use image node_id 7 for calling a global function with example usage: test_fs_observer_started_event_raises_file_exists_error(dir_obs, sample_run, monkeypatch) without return types