def METHOD_NAME(plan: SceptrePlan):
    s3_resource = boto3.resource("s3")
    return [
        s3_resource.Bucket(stack.template_bucket_name)
        for stack in plan.command_stacks
        if stack.template_bucket_name is not None
    ]