def METHOD_NAME(cls):
    cls.region_name = os.environ.get("AWS_DEFAULT_REGION")
    """Please read comments in package_integ_base.py for more details around this."""
    cls.pre_created_bucket = os.environ.get(os.environ.get("AWS_S3"), False)
    cls.bucket_name = cls.pre_created_bucket if cls.pre_created_bucket else str(uuid.uuid4())
    cls.bucket_name_placeholder = "<bucket-name>"
    cls.application_name_placeholder = "<application-name>"
    cls.temp_dir = Path(tempfile.mkdtemp())
    cls.test_data_path = Path(__file__).resolve().parents[1].joinpath("testdata", "publish")
    cls.sar_client = boto3.client("serverlessrepo", region_name=cls.region_name)
    # Initialize S3 client
    s3 = boto3.resource("s3")
    # Use a pre-created S3 Bucket if present else create a new one
    cls.s3_bucket = s3.Bucket(cls.bucket_name)
    if not cls.pre_created_bucket:
        cls.s3_bucket.create()
        # Wait for bucket to be created.
        time.sleep(S3_SLEEP)
        # Grant serverlessrepo read access to the bucket
        bucket_policy_template = cls.test_data_path.joinpath("s3_bucket_policy.json").read_text(encoding="utf-8")
        bucket_policy = bucket_policy_template.replace(cls.bucket_name_placeholder, cls.bucket_name)
        cls.s3_bucket.Policy().put(Policy=bucket_policy)
        # Wait for bucket policy to be applied.
        time.sleep(S3_SLEEP)
    # Upload test files to S3
    root_path = Path(__file__).resolve().parents[3]
    license_body = root_path.joinpath("LICENSE").read_text(encoding="utf-8")
    cls.s3_bucket.put_object(Key="LICENSE", Body=license_body)
    readme_body = root_path.joinpath("README.md").read_text(encoding="utf-8")
    cls.s3_bucket.put_object(Key="README.md", Body=readme_body)
    cls.s3_bucket.put_object(Key="README_UPDATE.md", Body=readme_body)
    code_body = cls.test_data_path.joinpath("main.py").read_text(encoding="utf-8")
    cls.s3_bucket.put_object(Key="main.py", Body=code_body)