class_docstr: Downloader from AWS S3 buckets
      
class_docstr_tok: ["Downloader","from","AWS","S3","buckets"]
docstr: Parameters
  ----------
  allow_old: bool, optional
    If a Downloader allows for persistent sessions by some means -- flag
    instructs whether to use previous session, or establish a new one
  
  Returns
  -------
  bool
    To state if old instance of a session/authentication was used
docstr_tok: ["Parameters","--","--","--","--","--","allow_old",":","bool",",","optional","If","a","Downloader","allows","for","persistent","sessions","by","some","means","--","flag","instructs","whether","to","use","previous","session",",","or","establish","a","new","one","Returns","--","--","--","-","bool","To","state","if","old","instance","of","a","session\/authentication","was","used"]
code: def _establish_session(self, url, allow_old=True):
      """
  
      Parameters
      ----------
      allow_old: bool, optional
        If a Downloader allows for persistent sessions by some means -- flag
        instructs whether to use previous session, or establish a new one
  
      Returns
      -------
      bool
        To state if old instance of a session/authentication was used
      """
      bucket_name = self._parse_url(url, bucket_only=True)
      if allow_old and self._bucket:
          if self._bucket.name == bucket_name:
              try:
                  self._check_credential()
                  lgr.debug(
                      "S3 session: Reusing previous connection to bucket %s",
                      bucket_name,
                  )
                  return True  # we used old
              except AccessPermissionExpiredError:
                  lgr.debug("S3 session: credential expired")
          else:
              lgr.warning(
                  "No support yet for multiple buckets per S3Downloader"
              )
  
      lgr.debug("S3 session: Reconnecting to the bucket")
      self._bucket = try_multiple_dec_s3(
          self.authenticator.authenticate
      )(bucket_name, self.credential)
      return False
  
imports: import re
  from urllib.parse import urlsplit, unquote
  from ..utils import auto_repr, ensure_dict_from_str
  from ..dochelpers import borrowkwargs
  from ..support.network import get_url_straight_filename, iso8601_to_epoch, rfc2822_to_epoch
  from .base import Authenticator
  from .base import BaseDownloader, DownloaderSession
  from ..support.exceptions import AccessPermissionExpiredError, CapturedException, TargetFileAbsent
  from ..support.s3 import Key, OrdinaryCallingFormat, S3ResponseError, boto, get_bucket, try_multiple_dec_s3
  from ..support.status import FileStatus
  import logging
  from logging import getLogger
label_desc: Use image node_id 5 for calling the S3Downloader obj's underlying member method code with example usage: obj._establish_session(url, allow_old) and returns: False, True