class_docstr: Store models on S3.
  
  Fetches them when needed, instead of storing them on the local disk.
class_docstr_tok: ["Store","models","on","S3",".","Fetches","them","when","needed",",","instead","of","storing","them","on","the","local","disk","."]
code: def _ensure_bucket_exists(
      self, bucket_name: Text, region_name: Optional[Text] = None
  ) -> None:
      import boto3
      import botocore
  
      if not region_name:
          region_name = boto3.DEFAULT_SESSION.region_name
  
      bucket_config = {"LocationConstraint": region_name}
      # noinspection PyUnresolvedReferences
      try:
          self.s3.create_bucket(
              Bucket=bucket_name,
              CreateBucketConfiguration=bucket_config,
          )
      except botocore.exceptions.ClientError:
          pass
  
imports: import abc
  import logging
  import os
  import shutil
  from typing import Optional, Text, Tuple, TYPE_CHECKING
  import rasa.shared.utils.common
  import rasa.utils.common
label_desc: Use image node_id 2 for calling the AWSPersistor obj's underlying member method code with example usage: obj._ensure_bucket_exists(bucket_name, region_name) without return types