code: def test_no_sources(tmpdir, tmpfile, sample_run):
      obs = FileStorageObserver(tmpdir, copy_sources=False)
      sample_run["ex_info"]["sources"] = [
          [tmpfile.name, tmpfile.md5sum]
      ]
      obs.started_event(**sample_run)
      assert not os.path.exists(tmpdir / "_sources")
  
      # Test the test: that the source would otherwise have been created.
      obs = FileStorageObserver(tmpdir, copy_sources=True)
      sample_run["_id"] = sample_run["_id"] + "_2"
      obs.started_event(**sample_run)
      name, _ = os.path.splitext(os.path.basename(tmpfile.name))
      assert os.path.exists(tmpdir / "_sources")
      assert any(
          x.startswith(name) for x in os.listdir(tmpdir / "_sources")
      )
  
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 24 for calling a global function with example usage: test_no_sources(tmpdir, tmpfile, sample_run) without return types