code: def test_fs_observer_resource_event(dir_obs, sample_run, tmpfile):
      basedir, obs = dir_obs
      _id = obs.started_event(**sample_run)
      run_dir = basedir.join(_id)
  
      obs.resource_event(tmpfile.name)
  
      res_dir = basedir.join("_resources")
      assert res_dir.exists()
      assert len(res_dir.listdir()) == 1
      assert res_dir.listdir()[0].read() == tmpfile.content
  
      run = json.loads(run_dir.join("run.json").read())
      assert len(run["resources"]) == 1
      assert run["resources"][0] == [
          tmpfile.name,
          res_dir.listdir()[0].strpath,
      ]
  
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 16 for calling a global function with example usage: test_fs_observer_resource_event(dir_obs, sample_run, tmpfile) without return types