code: def test_source_to_json():
      s = Source.create(EXAMPLE_SOURCE)
      assert s.to_json() == (
          os.path.abspath(EXAMPLE_SOURCE),
          EXAMPLE_DIGEST,
      )
  
imports: import os.path
  import os
  from pathlib import Path
  import mock
  import pytest
  from sacred.dependencies import PEP440_VERSION_PATTERN, PackageDependency, Source, gather_sources_and_dependencies, get_digest, get_py_file_if_possible, is_local_source
  import sacred.optional
label_desc: Use image node_id 7 for calling a global function with example usage: test_source_to_json() without return types