docstr: Create an ArtifactManifestEntry from an S3 object.
  
  Arguments:
      obj: The S3 object
      path: The S3-style path (e.g.: "s3://bucket/file.txt")
      name: The user assigned name, or None if not specified
      prefix: The prefix to add (will be the same as `path` for directories)
      multi: Whether or not this is a multi-object add.
docstr_tok: ["Create","an","ArtifactManifestEntry","from","an","S3","object",".","Arguments",":","obj",":","The","S3","object","path",":","The","S3-style","path","(","e.g",".",":","``","s3",":","\/\/bucket\/file.txt","''",")","name",":","The","user","assigned","name",",","or","None","if","not","specified","prefix",":","The","prefix","to","add","(","will","be","the","same","as","`","path","`","for","directories",")","multi",":","Whether","or","not","this","is","a","multi-object","add","."]
code: def _entry_from_obj(
      self,
      obj: Union["boto3.s3.Object", "boto3.s3.ObjectSummary"],
      path: str,
      name: Optional[StrPath] = None,
      prefix: str = "",
      multi: bool = False,
  ) -> ArtifactManifestEntry:
      """Create an ArtifactManifestEntry from an S3 object.
  
      Arguments:
          obj: The S3 object
          path: The S3-style path (e.g.: "s3://bucket/file.txt")
          name: The user assigned name, or None if not specified
          prefix: The prefix to add (will be the same as `path` for directories)
          multi: Whether or not this is a multi-object add.
      """
      bucket, key, _ = self._parse_uri(path)
  
      # Always use posix paths, since that's what S3 uses.
      posix_key = PurePosixPath(obj.key)  # the bucket key
      posix_path = (
          PurePosixPath(bucket) / key
      )  # the path, with the scheme stripped
      posix_prefix = PurePosixPath(
          prefix
      )  # the prefix, if adding a prefix
      posix_name = PurePosixPath(name or "")
      posix_ref = posix_path
  
      if name is None:
          # We're adding a directory (prefix), so calculate a relative path.
          if (
              str(posix_prefix) in str(posix_key)
              and posix_prefix != posix_key
          ):
              posix_name = posix_key.relative_to(posix_prefix)
              posix_ref = posix_path / posix_name
          else:
              posix_name = PurePosixPath(posix_key.name)
              posix_ref = posix_path
      elif multi:
          # We're adding a directory with a name override.
          relpath = posix_key.relative_to(posix_prefix)
          posix_name = posix_name / relpath
          posix_ref = posix_path / relpath
      return ArtifactManifestEntry(
          path=posix_name,
          ref=URIStr(f"{self._scheme}://{str(posix_ref)}"),
          digest=ETag(self._etag_from_obj(obj)),
          size=self._size_from_obj(obj),
          extra=self._extra_from_obj(obj),
      )
  
imports: import os
  import time
  from pathlib import PurePosixPath
  from typing import TYPE_CHECKING, Dict, Optional, Sequence, Tuple, Union
  from urllib.parse import parse_qsl, urlparse
  from wandb import util
  from wandb.errors import CommError
  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.hashutil import ETag
  from wandb.sdk.lib.paths import FilePathStr, StrPath, URIStr
label_desc: Use image node_id 8 for calling the S3Handler obj's underlying member method code with example usage: obj._entry_from_obj(obj, path, name, prefix, multi) and returns: ArtifactManifestEntry