code: def test_image_tag_from_dockerfile_and_source(mocker):
      _setup(mocker)
      source_string = "test-docker-image"
      mocker.launch_project.get_image_source_string = (
          lambda: source_string
      )
      resp = build.image_tag_from_dockerfile_and_source(
          mocker.launch_project, ""
      )
  
      tag = hashlib.sha256(source_string.encode("utf-8")).hexdigest()[
          :8
      ]
  
      assert resp == tag
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_builder/test_build.py
imports: import hashlib
  from unittest.mock import MagicMock
  import pytest
  from wandb.sdk.launch.builder import build
  from wandb.sdk.launch.builder.build import registry_from_uri
  from wandb.sdk.launch.errors import LaunchError
label_desc: Use image node_id 4 for calling a global function with example usage: test_image_tag_from_dockerfile_and_source(mocker) without return types