code: def test_local_load(dst_path, tmp_path):
      if dst_path is not None:
          dst_path = str(tmp_path / dst_path)
  
      # Test string file paths
      file_path = str(tmp_path / "myfile.txt")
      with open(file_path, "w") as f:
          f.write("text")
  
      file_dataset_source = resolve_dataset_source(file_path)
      assert file_dataset_source._get_source_type() == "local"
      assert (
          file_dataset_source.load(dst_path=dst_path) == dst_path
          or file_path
      )
      with open(file_path) as f:
          assert f.read() == "text"
  
      # Test directory paths with pathlib.Path
      dir_path = tmp_path / "mydir"
      os.makedirs(dir_path)
  
      dir_dataset_source = resolve_dataset_source(dir_path)
      assert file_dataset_source._get_source_type() == "local"
      assert dir_dataset_source.load() == dst_path or str(dir_path)
  
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 4 for calling a global function with example usage: test_local_load(dst_path, tmp_path) without return types