code: def update_axis_limits(
      ax,
      total_pos,
      pos_features,
      total_neg,
      neg_features,
      base_value,
      out_value,
  ):
      ax.set_ylim(-0.5, 0.15)
      padding = np.max(
          [np.abs(total_pos) * 0.2, np.abs(total_neg) * 0.2]
      )
  
      if len(pos_features) > 0:
          min_x = (
              min(np.min(pos_features[:, 0].astype(float)), base_value)
              - padding
          )
      else:
          min_x = out_value - padding
      if len(neg_features) > 0:
          max_x = (
              max(np.max(neg_features[:, 0].astype(float)), base_value)
              + padding
          )
      else:
          max_x = out_value + padding
      ax.set_xlim(min_x, max_x)
  
      plt.tick_params(
          top=True,
          bottom=False,
          left=False,
          right=False,
          labelleft=False,
          labeltop=True,
          labelbottom=False,
      )
      plt.locator_params(axis="x", nbins=12)
  
      for key, spine in zip(
          plt.gca().spines.keys(), plt.gca().spines.values()
      ):
          if key != "top":
              spine.set_visible(False)
  
file_path: shap/shap/plots/_force_matplotlib.py
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import lines
  from matplotlib.font_manager import FontProperties
  from matplotlib.patches import PathPatch
  from matplotlib.path import Path
label_desc: Use image node_id 7 for calling a global function with example usage: update_axis_limits(ax, total_pos, pos_features, total_neg, neg_features, base_value, out_value) without return types