code: def maptiles_lets_plot(url: str = None, theme: str = None) -> dict:
      """
      Make vector tiles config. Can be used individually in `geom_livemap()`
      or in every livemap via `LetsPlot.set()`.
  
      Parameters
      ----------
      url : str
          Address of the tile server. Can be omitted if URL is already set in global settings.
  
      theme : {'color', 'light', 'dark', 'bw'}
          Tiles theme.
  
      Returns
      -------
      dict
          Tile provider settings.
  
      Notes
      -----
      If you are using Safari and having trouble loading tiles, try disabling the NSURLSession Websocket feature.
      Go to `Develop -> Experimental Features -> NSURLSession Websocket` to turn it off.
  
      Also, you could use raster tiles from `lets_plot.tilesets`, e.g.
      `ggplot() + geom_livemap(tiles=tilesets.OPEN_TOPO_MAP)`
  
      Examples
      --------
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 3
  
          from lets_plot import *
          LetsPlot.setup_html()
          tiles = maptiles_lets_plot(url='wss://tiles.datalore.jetbrains.com', theme='light')
          ggplot() + geom_livemap(tiles=tiles)
  
      """
      assert isinstance(
          url, (str, type(None))
      ), "'url' argument is not str: {}".format(type(url))
      assert isinstance(
          theme, (str, type(None))
      ), "'theme' argument is not str: {}".format(type(theme))
  
      if url is None:
          global_maptiles_kind = (
              get_global_val(MAPTILES_KIND)
              if has_global_value(MAPTILES_KIND)
              else None
          )
          global_maptiles_url = (
              get_global_val(MAPTILES_URL)
              if has_global_value(MAPTILES_URL)
              else None
          )
  
          # try to read url from global settings
          if global_maptiles_kind == TILES_VECTOR_LETS_PLOT:
              if global_maptiles_url is None:
                  # global URL is somehow broken - use default URL
                  url = _DATALORE_TILES_SERVICE
              else:
                  url = global_maptiles_url
          else:
              # User input:
              # LetsPlot.set(maptiles_zxy(...))
              # LetsPlot.set(maptiles_lets_plot(...))
              # In this case global_maptiles_url will contain not-applicable raster tile URL.
              # Use hardcoded lets_plot tiles URL.
              url = _DATALORE_TILES_SERVICE
  
      if url is None:
          raise ValueError("lets_plot tiles service URL is not defined")
  
      return {
          MAPTILES_KIND: TILES_VECTOR_LETS_PLOT,
          MAPTILES_URL: url,
          MAPTILES_THEME: theme,
          MAPTILES_ATTRIBUTION: _DATALORE_TILES_ATTRIBUTION,
          MAPTILES_MIN_ZOOM: _DATALORE_TILES_MIN_ZOOM,
          MAPTILES_MAX_ZOOM: _DATALORE_TILES_MAX_ZOOM,
      }
  
file_path: lets-plot/python-package/lets_plot/settings_utils.py
imports: from ._global_settings import GEOCODING_PROVIDER_URL, MAPTILES_SOLID_FILL_COLOR, TILES_CHESSBOARD, _DATALORE_TILES_SERVICE
  from ._global_settings import MAPTILES_KIND, MAPTILES_URL, MAPTILES_THEME, MAPTILES_ATTRIBUTION, MAPTILES_MIN_ZOOM, MAPTILES_MAX_ZOOM, TILES_VECTOR_LETS_PLOT, TILES_RASTER_ZXY, TILES_SOLID, _DATALORE_TILES_ATTRIBUTION
  from ._global_settings import has_global_value, get_global_val, _DATALORE_TILES_MIN_ZOOM, _DATALORE_TILES_MAX_ZOOM
label_desc: Use image node_id 1 for calling a global function with example usage: maptiles_lets_plot(url, theme) and returns: dict