class_docstr: BaseInteractiveApp is a base class for creating/accessing apps hosted on SageMaker.
docstr: Initialize a BaseInteractiveApp object.
  
  Args:
      region (str): Optional. The AWS Region, e.g. us-east-1. If not specified,
          one is created using the default AWS configuration chain.
          Default: ``None``
docstr_tok: ["Initialize","a","BaseInteractiveApp","object",".","Args",":","region","(","str",")",":","Optional",".","The","AWS","Region",",","e.g",".","us-east-1",".","If","not","specified",",","one","is","created","using","the","default","AWS","configuration","chain",".","Default",":","``","None","``"]
code: def __init__(
      self,
      region: Optional[str] = None,
  ):
      """Initialize a BaseInteractiveApp object.
  
      Args:
          region (str): Optional. The AWS Region, e.g. us-east-1. If not specified,
              one is created using the default AWS configuration chain.
              Default: ``None``
      """
      if isinstance(region, str):
          self.region = region
      else:
          try:
              self.region = Session().boto_region_name
          except ValueError:
              raise ValueError(
                  "Failed to get the Region information from the default config. Please either "
                  "pass your Region manually as an input argument or set up the local AWS"
                  " configuration."
              )
  
      self._sagemaker_client = boto3.client(
          "sagemaker", region_name=self.region
      )
      # Used to store domain and user profile info retrieved from Studio environment.
      self._domain_id = None
      self._user_profile_name = None
      self._in_studio_env = False
      self._get_domain_and_user()
  
imports: from __future__ import absolute_import
  import abc
  import base64
  import json
  import logging
  import os
  import re
  import webbrowser
  from typing import Optional
  import boto3
  from sagemaker.session import Session, NOTEBOOK_METADATA_FILE
label_desc: Use image node_id 1 to create a new BaseInteractiveApp object from inherited base classes: abc with example: obj = BaseInteractiveApp(region)