class_docstr: Handles file:// references.
class_docstr_tok: ["Handles","file",":","\/\/","references","."]
code: def load_path(
      self,
      manifest_entry: ArtifactManifestEntry,
      local: bool = False,
  ) -> Union[URIStr, FilePathStr]:
      if manifest_entry.ref is None:
          raise ValueError(
              f"Cannot add path with no ref: {manifest_entry.path}"
          )
      local_path = util.local_file_uri_to_path(str(manifest_entry.ref))
      if not os.path.exists(local_path):
          raise ValueError(
              "Local file reference: Failed to find file at path %s"
              % local_path
          )
  
      path, hit, cache_open = self._cache.check_md5_obj_path(
          B64MD5(
              manifest_entry.digest
          ),  # TODO(spencerpearson): unsafe cast
          manifest_entry.size if manifest_entry.size is not None else 0,
      )
      if hit:
          return path
  
      md5 = md5_file_b64(local_path)
      if md5 != manifest_entry.digest:
          raise ValueError(
              f"Local file reference: Digest mismatch for path {local_path}: expected {manifest_entry.digest} but found {md5}"
          )
  
      filesystem.mkdir_exists_ok(os.path.dirname(path))
  
      with cache_open() as f:
          shutil.copy(local_path, f.name)
      return path
  
file_path: wandb/wandb/sdk/artifacts/storage_handlers/local_file_handler.py
imports: import os
  import shutil
  import time
  from typing import TYPE_CHECKING, Optional, Sequence, Union
  from urllib.parse import ParseResult
  from wandb import util
  from wandb.errors.term import termlog
  from wandb.sdk.artifacts.artifact_file_cache import get_artifact_file_cache
  from wandb.sdk.artifacts.artifact_manifest_entry import ArtifactManifestEntry
  from wandb.sdk.artifacts.storage_handler import DEFAULT_MAX_OBJECTS, StorageHandler
  from wandb.sdk.lib import filesystem
  from wandb.sdk.lib.hashutil import B64MD5, md5_file_b64, md5_string
  from wandb.sdk.lib.paths import FilePathStr, StrPath, URIStr
label_desc: Use image node_id 3 for calling the LocalFileHandler obj's underlying member method code with example usage: obj.load_path(manifest_entry, local) and returns: path, path