code: def get_enabled_regions(app_spec, from_command_line):
      
      enabled_regions = dxpy.executable_builder.get_enabled_regions('app', app_spec, from_command_line, AppBuilderException)
  
      if enabled_regions is not None and len(enabled_regions) == 0:
          raise AssertionError("This app should be enabled in at least one region")
      return enabled_regions
docs: Returns a list of the regions in which the app should be enabled.
  
      Also validates that app_spec['regionalOptions'], if supplied, is
      well-formed.
  
      :param app_spec: app specification
      :type app_spec: dict
      :param from_command_line: The regions specified on the command-line
        via --region
      :type from_command_line: list or None