code: def process_axis_and_grid(
      plot: Plot,
      axis_type: AxisType | None,
      axis_location: AxisLocation | None,
      minor_ticks: int | Literal["auto"] | None,
      axis_label: str | BaseText | None,
      rng: Range,
      dim: Dim,
  ) -> None:
      axiscls, axiskw = _get_axis_class(axis_type, rng, dim)
  
      if axiscls:
          axis = axiscls(**axiskw)
  
          if isinstance(axis.ticker, ContinuousTicker):
              axis.ticker.num_minor_ticks = _get_num_minor_ticks(
                  axiscls, minor_ticks
              )
  
          if axis_label:
              axis.axis_label = axis_label
  
          grid = Grid(dimension=dim, axis=axis)
          plot.add_layout(grid, "center")
  
          if axis_location is not None:
              getattr(plot, axis_location).append(axis)
  
file_path: bokeh/src/bokeh/plotting/_plot.py
imports: from __future__ import annotations
  import logging
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Any, Literal
  import numpy
  from ..core.properties import Datetime
  from ..core.property.singletons import Intrinsic
  from ..models import Axis, CategoricalAxis, CategoricalScale, ContinuousTicker, DataRange1d, DatetimeAxis, FactorRange, Grid, LinearAxis, LinearScale, LogAxis, LogScale, MercatorAxis, Range, Range1d, Scale
label_desc: Use image node_id 3 for calling a global function with example usage: process_axis_and_grid(plot, axis_type, axis_location, minor_ticks, axis_label, rng, dim) without return types