code: def _update_grid(self, x1, y1, x2, y2):
      # self.grid_info = self.grid_finder.get_grid_info(x1, y1, x2, y2)
  
      if self.grid_info is None:
          self.grid_info = dict()
  
      grid_info = self.grid_info
  
      grid_finder = self.grid_finder
      extremes = grid_finder.extreme_finder(
          grid_finder.inv_transform_xy, x1, y1, x2, y2
      )
  
      lon_min, lon_max = sorted(extremes[:2])
      lat_min, lat_max = sorted(extremes[2:])
      lon_levs, lon_n, lon_factor = grid_finder.grid_locator1(
          lon_min, lon_max
      )
      lat_levs, lat_n, lat_factor = grid_finder.grid_locator2(
          lat_min, lat_max
      )
      grid_info["extremes"] = (
          lon_min,
          lon_max,
          lat_min,
          lat_max,
      )  # extremes
  
      grid_info["lon_info"] = lon_levs, lon_n, lon_factor
      grid_info["lat_info"] = lat_levs, lat_n, lat_factor
  
      grid_info["lon_labels"] = grid_finder.tick_formatter1(
          "bottom", lon_factor, lon_levs
      )
  
      grid_info["lat_labels"] = grid_finder.tick_formatter2(
          "bottom", lat_factor, lat_levs
      )
  
      if lon_factor is None:
          lon_values = np.asarray(lon_levs[:lon_n])
      else:
          lon_values = np.asarray(lon_levs[:lon_n] / lon_factor)
      if lat_factor is None:
          lat_values = np.asarray(lat_levs[:lat_n])
      else:
          lat_values = np.asarray(lat_levs[:lat_n] / lat_factor)
  
      lon_values0 = lon_values[
          (lon_min < lon_values) & (lon_values < lon_max)
      ]
      lat_values0 = lat_values[
          (lat_min < lat_values) & (lat_values < lat_max)
      ]
      lon_lines, lat_lines = grid_finder._get_raw_grid_lines(
          lon_values0, lat_values0, lon_min, lon_max, lat_min, lat_max
      )
  
      grid_info["lon_lines"] = lon_lines
      grid_info["lat_lines"] = lat_lines
  
      lon_lines, lat_lines = grid_finder._get_raw_grid_lines(
          extremes[:2], extremes[2:], *extremes
      )
      # lon_min, lon_max,
      #                                                       lat_min, lat_max)
  
      grid_info["lon_lines0"] = lon_lines
      grid_info["lat_lines0"] = lat_lines
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import zip
  import numpy
  from matplotlib.transforms import Affine2D, IdentityTransform
  from .None import grid_helper_curvelinear
  from .axislines import AxisArtistHelper, GridHelperBase
  from .axis_artist import AxisArtist
  from .grid_finder import GridFinder
  from .grid_finder import ExtremeFinderSimple
  from .axislines import Axes
  from mpl_toolkits.axes_grid1.parasite_axes import host_axes_class_factory
  import matplotlib.axes
label_desc: Use image node_id 4 for calling the GridHelperCurveLinear obj's underlying member method code with example usage: obj._update_grid(x1, y1, x2, y2) without return types