code: def test_s3_load(mock_s3_bucket, dst_path, tmp_path):
      if dst_path is not None:
          dst_path = str(tmp_path / dst_path)
  
      file_path = str(tmp_path / "myfile.txt")
      with open(file_path, "w") as f:
          f.write("text")
  
      S3ArtifactRepository(f"s3://{mock_s3_bucket}").log_artifact(
          file_path
      )
  
      s3_source_uri = f"s3://{mock_s3_bucket}/myfile.txt"
      s3_dataset_source = resolve_dataset_source(s3_source_uri)
      assert s3_dataset_source._get_source_type() == "s3"
      downloaded_source = s3_dataset_source.load(dst_path=dst_path)
      if dst_path is not None:
          assert downloaded_source == os.path.join(
              dst_path, "myfile.txt"
          )
      with open(downloaded_source) as f:
          assert f.read() == "text"
  
file_path: mlflow/tests/data/test_artifact_dataset_sources.py
imports: import json
  import os
  from unittest import mock
  import pytest
  from mlflow.data.dataset_source_registry import get_dataset_source_from_json, resolve_dataset_source
  from mlflow.data.filesystem_dataset_source import FileSystemDatasetSource
  from mlflow.store.artifact.s3_artifact_repo import S3ArtifactRepository
label_desc: Use image node_id 5 for calling a global function with example usage: test_s3_load(mock_s3_bucket, dst_path, tmp_path) without return types