code: def _lambert_ticks(ax, ticks, tick_location, line_constructor, tick_extractor):
      
      outline_patch = sgeom.LineString(ax.outline_patch.get_path().vertices.tolist())
      axis = find_side(outline_patch, tick_location)
      n_steps = 30
      extent = ax.get_extent(ccrs.PlateCarree())
      _ticks = []
      for t in ticks:
          xy = line_constructor(t, n_steps, extent)
          proj_xyz = ax.projection.transform_points(ccrs.Geodetic(), xy[:, 0], xy[:, 1])
          xyt = proj_xyz[..., :2]
          ls = sgeom.LineString(xyt.tolist())
          locs = axis.intersection(ls)
          if not locs:
              tick = [None]
          else:
              tick = tick_extractor(locs.xy)
          _ticks.append(tick[0])
      # Remove ticks that aren't visible:    
      ticklabels = copy(ticks)
      while True:
          try:
              index = _ticks.index(None)
          except ValueError:
              break
          _ticks.pop(index)
          ticklabels.pop(index)
      return _ticks, ticklabels
docs: Get the tick locations and labels for an axis of a Lambert Conformal projection.