class_docstr: Image event adapter 
class_docstr_tok: ["Image","event","adapter"]
code: def get_target_full_upload_uri(
      self, storage_uri, storage_key_prefix=None, quote_uri=True
  ):
      def limit_path_folder_length(folder_path):
          if not folder_path or len(folder_path) <= 250:
              return folder_path
          parts = folder_path.split(".")
          if len(parts) > 1:
              prefix = hashlib.md5(
                  str(".".join(parts[:-1])).encode("utf-8")
              ).hexdigest()
              new_path = "{}.{}".format(prefix, parts[-1])
              if len(new_path) <= 250:
                  return new_path
          return hashlib.md5(
              str(folder_path).encode("utf-8")
          ).hexdigest()
  
      self._generate_file_name()
      e_storage_uri = self._upload_uri or storage_uri
      # if we have an entry (with or without a stream), we'll generate the URL and store it in the event
      filename = self._upload_filename
      if self._override_storage_key_prefix or not storage_key_prefix:
          storage_key_prefix = self._override_storage_key_prefix
      key = "/".join(
          x
          for x in (
              storage_key_prefix,
              self._replace_slash(self.metric),
              self._replace_slash(self.variant),
              self._replace_slash(filename),
          )
          if x
      )
      key = "/".join(
          limit_path_folder_length(x) for x in key.split("/")
      )
      url = "/".join(x.strip("/") for x in (e_storage_uri, key))
      # make sure we preserve local path root
      if e_storage_uri.startswith("/"):
          url = "/" + url
  
      if quote_uri:
          url = quote_url(url)
  
      return key, url
  
imports: import abc
  import hashlib
  import time
  from functools import reduce
  from logging import getLevelName
  import attr
  import numpy
  import pathlib2
  import six
  from PIL import Image
  from six.moves.urllib.parse import urlparse, urlunparse
  from ...backend_api.services import events
  from ...config import deferred_config
  from ...debugging.log import LoggerRoot
  from ...storage.util import quote_url
  from ...utilities.attrs import attrs
  from ...utilities.process.mp import SingletonLock
label_desc: Use image node_id 8 for calling the UploadEvent obj's underlying member method code with example usage: obj.get_target_full_upload_uri(storage_uri, storage_key_prefix, quote_uri) and returns: key,  url, hashlib, folder_path, new_path