code: def grid_selector(grid):
      raster_fn = lambda x: True if isinstance(x, Raster) else False
      all_raster = all(grid.traverse(raster_fn, [Element]))
      return "RasterGridPlot" if all_raster else "GridPlot"
  
imports: import os
  from colorcet import kbc, register_cmap
  from matplotlib import rc_params_from_file
  from matplotlib.colors import LinearSegmentedColormap, ListedColormap
  from packaging.version import Version
  from param import concrete_descendents
  from ...core import Collator, GridMatrix, Layout, config
  from ...core.options import Cycle, Options, Palette
  from ...core.overlay import NdOverlay, Overlay
  from ...element import *
  from ..plot import PlotSelector
  from ..util import fire_colors
  from .annotation import *
  from .chart import *
  from .chart3d import *
  from .element import ElementPlot
  from .geometry import *
  from .graphs import *
  from .heatmap import *
  from .hex_tiles import *
  from .path import *
  from .plot import *
  from .raster import *
  from .renderer import MPLRenderer
  from .sankey import *
  from .stats import *
  from .tabular import *
label_desc: Use image node_id 3 for calling a global function with example usage: grid_selector(grid) and returns: unknown