code: def _apply_eng_formatter(ax, which):
      """Apply engineering format to axis ticks.
  
      Parameters
      ----------
      ax : Axes
          Matplotlib Axes object.
      which : str, {"x", "y"}
          The axis to apply the format to.
      """
      if which == "x":
          axis = ax.xaxis
          current_min, current_max = ax.get_xlim()
      elif which == "y":
          axis = ax.yaxis
          current_min, current_max = ax.get_ylim()
      else:
          raise ValueError(
              f"Can only format x-axis or y-axis, not {which}"
          )
  
      if current_max > 4000 or current_min < -1000:
          axis.set_major_formatter(EngFormatter())
  
imports: from warnings import warn
  from functools import reduce
  import itertools
  import numpy
  import pandas
  import matplotlib.pyplot
  from matplotlib.axes import Axes
  from matplotlib.patches import Rectangle, Patch
  from matplotlib.ticker import EngFormatter
  from seaborn.utils import despine
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.metrics import roc_curve
  from sklearn.model_selection import cross_val_score, StratifiedShuffleSplit
  from ..preprocessing import detect_types
  from .._config import get_config
label_desc: Use image node_id 26 for calling a global function with example usage: _apply_eng_formatter(ax, which) without return types