code: def ax_has_xgrid(ax):
      if not ax:
          return False
      _gridOnMajor = (
          ax.xaxis._gridOnMajor
          if hasattr(ax.xaxis, "_gridOnMajor")
          else ax.xaxis._major_tick_kw["gridOn"]
      )
      return bool(ax and _gridOnMajor and ax.yaxis.get_gridlines())
  
imports: import warnings
  import itertools
  from contextlib import contextmanager
  from distutils.version import LooseVersion
  import numpy
  import matplotlib
  from matplotlib import transforms
  from ..None import utils
  from ..None import _py3k_compat
label_desc: Use image node_id 2 for calling the Renderer obj's underlying member method code with example usage: obj.ax_has_xgrid(ax) and returns: bool, False