class_docstr: Internal helper for `~.grid_helper_curvelinear.GridHelperCurveLinear`, with
  the same constructor parameters; should not be directly instantiated.
class_docstr_tok: ["Internal","helper","for","`","~.grid_helper_curvelinear.GridHelperCurveLinear","`",",","with","the","same","constructor","parameters",";","should","not","be","directly","instantiated","."]
code: def _clip_grid_lines_and_find_ticks(self, lines, values, levs, bb):
      gi = {
          "values": [],
          "levels": [],
          "tick_levels": dict(left=[], bottom=[], right=[], top=[]),
          "tick_locs": dict(left=[], bottom=[], right=[], top=[]),
          "lines": [],
      }
  
      tck_levels = gi["tick_levels"]
      tck_locs = gi["tick_locs"]
      for (lx, ly), v, lev in zip(lines, values, levs):
          tcks = _find_line_box_crossings(np.column_stack([lx, ly]), bb)
          gi["levels"].append(v)
          gi["lines"].append([(lx, ly)])
  
          for tck, direction in zip(
              tcks, ["left", "right", "bottom", "top"]
          ):
              for t in tck:
                  tck_levels[direction].append(lev)
                  tck_locs[direction].append(t)
  
      return gi
  
imports: import numpy
  from matplotlib import ticker
  from matplotlib.transforms import Bbox, Transform
label_desc: Use image node_id 4 for calling the GridFinder obj's underlying member method code with example usage: obj._clip_grid_lines_and_find_ticks(lines, values, levs, bb) and returns: gi