docstr: For art_dict representing external S3-based artifact,
  build configuration suitable for constructing
  S3-based storage handler for this artifact.
  Returns: (configuration dictionary, artifact's S3 key)
docstr_tok: ["For","art_dict","representing","external","S3-based","artifact",",","build","configuration","suitable","for","constructing","S3-based","storage","handler","for","this","artifact",".","Returns",":","(","configuration","dictionary",",","artifact","'s","S3","key",")"]
code: def _build_s3_config(self, art_dict):
      """
      For art_dict representing external S3-based artifact,
      build configuration suitable for constructing
      S3-based storage handler for this artifact.
      Returns: (configuration dictionary, artifact's S3 key)
      """
      url, bucket, key = util.parse_s3_path(self.remote_path)
      config = dict()
      config["endpoint"] = "http://{0}".format(url)
      config["bucket"] = bucket
      config[credentials.KEY_CREDENTIALS] = (
          self.credentials.to_dict() if self.credentials else dict()
      )
      if "region" in art_dict.keys():
          config["region"] = art_dict["region"]
  
      return config, key
  
imports: import hashlib
  import os
  import re
  import tarfile
  from typing import Dict
  from studio.artifacts import artifacts_tracker
  from studio.util import util, logs
  from studio.credentials import credentials
  from studio.storage import storage_setup
  from studio.storage.storage_type import StorageType
  from studio.storage.storage_handler import StorageHandler
  from studio.storage.storage_handler_factory import StorageHandlerFactory
  from studio.storage.storage_util import tar_artifact, untar_artifact
label_desc: Use image node_id 15 for calling the Artifact obj's underlying member method code with example usage: obj._build_s3_config(art_dict) and returns: config,  key