class_docstr: Handles file:// references.
class_docstr_tok: ["Handles","file",":","\/\/","references","."]
code: def store_path(
      self,
      artifact: "Artifact",
      path: Union[URIStr, FilePathStr],
      name: Optional[StrPath] = None,
      checksum: bool = True,
      max_objects: Optional[int] = None,
  ) -> Sequence[ArtifactManifestEntry]:
      local_path = util.local_file_uri_to_path(path)
      max_objects = max_objects or DEFAULT_MAX_OBJECTS
      # We have a single file or directory
      # Note, we follow symlinks for files contained within the directory
      entries = []
  
      def md5(path: str) -> B64MD5:
          return (
              md5_file_b64(path)
              if checksum
              else md5_string(str(os.stat(path).st_size))
          )
  
      if os.path.isdir(local_path):
          i = 0
          start_time = time.time()
          if checksum:
              termlog(
                  'Generating checksum for up to %i files in "%s"...\n'
                  % (max_objects, local_path),
                  newline=False,
              )
          for root, _, files in os.walk(local_path):
              for sub_path in files:
                  i += 1
                  if i > max_objects:
                      raise ValueError(
                          "Exceeded %i objects tracked, pass max_objects to add_reference"
                          % max_objects
                      )
                  physical_path = os.path.join(root, sub_path)
                  # TODO(spencerpearson): this is not a "logical path" in the sense that
                  # `LogicalPath` returns a "logical path"; it's a relative path
                  # **on the local filesystem**.
                  logical_path = os.path.relpath(
                      physical_path, start=local_path
                  )
                  if name is not None:
                      logical_path = os.path.join(name, logical_path)
  
                  entry = ArtifactManifestEntry(
                      path=logical_path,
                      ref=FilePathStr(os.path.join(path, logical_path)),
                      size=os.path.getsize(physical_path),
                      digest=md5(physical_path),
                  )
                  entries.append(entry)
          if checksum:
              termlog(
                  "Done. %.1fs" % (time.time() - start_time),
                  prefix=False,
              )
      elif os.path.isfile(local_path):
          name = name or os.path.basename(local_path)
          entry = ArtifactManifestEntry(
              path=name,
              ref=path,
              size=os.path.getsize(local_path),
              digest=md5(local_path),
          )
          entries.append(entry)
      else:
          # TODO: update error message if we don't allow directories.
          raise ValueError(
              'Path "%s" must be a valid file or directory path' % path
          )
      return entries
  
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 4 for calling the LocalFileHandler obj's underlying member method code with example usage: obj.store_path(artifact, path, name, checksum, max_objects) and returns: entries, unknown