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","."]
docstr: lon_values, lat_values : list of grid values. if integer is given,
                     rough number of grids in each direction.
docstr_tok: ["lon_values",",","lat_values",":","list","of","grid","values",".","if","integer","is","given",",","rough","number","of","grids","in","each","direction","."]
code: def get_grid_info(self, x1, y1, x2, y2):
      """
      lon_values, lat_values : list of grid values. if integer is given,
                         rough number of grids in each direction.
      """
  
      extremes = self.extreme_finder(
          self.inv_transform_xy, x1, y1, x2, y2
      )
  
      # min & max rage of lat (or lon) for each grid line will be drawn.
      # i.e., gridline of lon=0 will be drawn from lat_min to lat_max.
  
      lon_min, lon_max, lat_min, lat_max = extremes
      lon_levs, lon_n, lon_factor = self.grid_locator1(lon_min, lon_max)
      lon_levs = np.asarray(lon_levs)
      lat_levs, lat_n, lat_factor = self.grid_locator2(lat_min, lat_max)
      lat_levs = np.asarray(lat_levs)
  
      lon_values = lon_levs[:lon_n] / lon_factor
      lat_values = lat_levs[:lat_n] / lat_factor
  
      lon_lines, lat_lines = self._get_raw_grid_lines(
          lon_values, lat_values, lon_min, lon_max, lat_min, lat_max
      )
  
      bb = Bbox.from_extents(x1, y1, x2, y2).expanded(
          1 + 2e-10, 1 + 2e-10
      )
  
      grid_info = {
          "extremes": extremes,
          # "lon", "lat", filled below.
      }
  
      for idx, lon_or_lat, levs, factor, values, lines in [
          (1, "lon", lon_levs, lon_factor, lon_values, lon_lines),
          (2, "lat", lat_levs, lat_factor, lat_values, lat_lines),
      ]:
          grid_info[lon_or_lat] = gi = {
              "lines": [[l] for l in lines],
              "ticks": {
                  "left": [],
                  "right": [],
                  "bottom": [],
                  "top": [],
              },
          }
          for (lx, ly), v, level in zip(lines, values, levs):
              all_crossings = _find_line_box_crossings(
                  np.column_stack([lx, ly]), bb
              )
              for side, crossings in zip(
                  ["left", "right", "bottom", "top"], all_crossings
              ):
                  for crossing in crossings:
                      gi["ticks"][side].append(
                          {"level": level, "loc": crossing}
                      )
          for side in gi["ticks"]:
              levs = [tick["level"] for tick in gi["ticks"][side]]
              labels = self._format_ticks(idx, side, factor, levs)
              for tick, label in zip(gi["ticks"][side], labels):
                  tick["label"] = label
  
      return grid_info
  
imports: import numpy
  from matplotlib import ticker, _api
  from matplotlib.transforms import Bbox, Transform
label_desc: Use image node_id 3 for calling the GridFinder obj's underlying member method code with example usage: obj.get_grid_info(x1, y1, x2, y2) and returns: grid_info