code: def extract_files_from_s3(s3_url, tmpdir, sagemaker_session):
      parsed_url = urlparse(s3_url)
      s3 = boto3.resource(
          "s3", region_name=sagemaker_session.boto_region_name
      )
  
      model = os.path.join(tmpdir, "model")
      s3.Bucket(parsed_url.netloc).download_file(
          parsed_url.path.lstrip("/"), model
      )
  
      with tarfile.open(model, "r") as tar_file:
          tar_file.extractall(tmpdir)
  
file_path: sagemaker-python-sdk/tests/integ/s3_utils.py
imports: from __future__ import absolute_import
  import os
  import re
  import tarfile
  import boto3
  from six.moves.urllib.parse import urlparse
label_desc: Use image node_id 3 for calling a global function with example usage: extract_files_from_s3(s3_url, tmpdir, sagemaker_session) without return types