code: def _get_bucket_connection(credential):
      # eventually we should be able to have multiple credentials associated
      # with different resources. Thus for now just making an option which
      # one to use
      # do full shebang with entering credentials
      from datalad.downloaders.credentials import AWS_S3
  
      credential = AWS_S3(credential, None)
      if not credential.is_known:
          credential.enter_new()
      creds = credential()
      return boto.connect_s3(creds["key_id"], creds["secret_id"])
  
imports: import mimetypes
  from os.path import splitext
  import re
  from datalad.support.network import urlquote, URL
  import logging
  import datalad.log
  from datalad.support.exceptions import CapturedException, DownloadError, AccessDeniedError, AccessPermissionExpiredError, AnonymousAccessDeniedError
  from datalad.utils import try_multiple_dec
  from urllib.request import urlopen, Request
label_desc: Use image node_id 1 for calling a global function with example usage: _get_bucket_connection(credential) and returns: boto