code: def assert_s3_files_exist(sagemaker_session, s3_url, files):
      parsed_url = urlparse(s3_url)
      region = sagemaker_session.boto_region_name
      s3 = boto3.client("s3", region_name=region)
      contents = s3.list_objects_v2(
          Bucket=parsed_url.netloc, Prefix=parsed_url.path.lstrip("/")
      )["Contents"]
      for f in files:
          found = [x["Key"] for x in contents if x["Key"].endswith(f)]
          if not found:
              raise ValueError(
                  "File {} is not found under {}".format(f, s3_url)
              )
  
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 1 for calling a global function with example usage: assert_s3_files_exist(sagemaker_session, s3_url, files) without return types