code: def test_tinydb_observer_resource_event_when_resource_present(
      tinydb_obs, sample_run
  ):
      tinydb_obs.started_event(**sample_run)
  
      filename = "setup.py"
      md5 = get_digest(filename)
  
      # Add file by other means
      tinydb_obs.fs.put(filename)
  
      tinydb_obs.resource_event(filename)
  
      db_run = tinydb_obs.runs.get(doc_id=1)
      assert db_run["resources"][0][:2] == [filename, md5]
  
imports: from __future__ import division, print_function, unicode_literals, absolute_import
  import os
  import datetime
  import tempfile
  import io
  import pytest
  from tinydb import TinyDB
  from hashfs import HashFS
  from sacred.dependencies import get_digest
  from sacred.observers.tinydb_hashfs import TinyDbObserver, tiny_db_option
  from sacred.observers.tinydb_hashfs.bases import BufferedReaderWrapper
  from sacred import optional
  from sacred.experiment import Experiment
label_desc: Use image node_id 16 for calling a global function with example usage: test_tinydb_observer_resource_event_when_resource_present(tinydb_obs, sample_run) without return types