code: def count_rows_with_nans(X):
      """Count the number of rows in 2D arrays that contain any nan values."""
      if X.ndim == 2:
          return np.where(np.isnan(X).sum(axis=1) != 0, 1, 0).sum()
  
imports: import numpy
  import warnings
  from yellowbrick.exceptions import DataWarning
label_desc: Use image node_id 4 for calling a global function with example usage: count_rows_with_nans(X) and returns: np