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: Helper to support both standard formatters (inheriting from
  `.mticker.Formatter`) and axisartist-specific ones; should be called instead of
  directly calling ``self.tick_formatter1`` and ``self.tick_formatter2``.  This
  method should be considered as a temporary workaround which will be removed in
  the future at the same time as axisartist-specific formatters.
docstr_tok: ["Helper","to","support","both","standard","formatters","(","inheriting","from","`",".mticker.Formatter","`",")","and","axisartist-specific","ones",";","should","be","called","instead","of","directly","calling","``","self.tick_formatter1","``","and","``","self.tick_formatter2","``",".","This","method","should","be","considered","as","a","temporary","workaround","which","will","be","removed","in","the","future","at","the","same","time","as","axisartist-specific","formatters","."]
code: def _format_ticks(self, idx, direction, factor, levels):
      """
      Helper to support both standard formatters (inheriting from
      `.mticker.Formatter`) and axisartist-specific ones; should be called instead of
      directly calling ``self.tick_formatter1`` and ``self.tick_formatter2``.  This
      method should be considered as a temporary workaround which will be removed in
      the future at the same time as axisartist-specific formatters.
      """
      fmt = _api.check_getitem(
          {1: self.tick_formatter1, 2: self.tick_formatter2}, idx=idx
      )
      return (
          fmt.format_ticks(levels)
          if isinstance(fmt, mticker.Formatter)
          else fmt(direction, factor, levels)
      )
  
imports: import numpy
  from matplotlib import ticker, _api
  from matplotlib.transforms import Bbox, Transform
label_desc: Use image node_id 2 for calling the GridFinder obj's underlying member method code with example usage: obj._format_ticks(idx, direction, factor, levels) and returns: unknown