code: def test_count_rows_in_2d_arrays_with_nans():
      """Test that nan-containinr rows in 2d arrays are counted correctly."""
      data_1_row = np.array([[1, 2, 3]])
  
      data_2_rows = np.array(
          [[1, 2, 3], [1, 2, 3], [np.nan, 2, 3], [1, np.nan, 3]]
      )
  
      data_3_rows = np.array(
          [
              [1, 2, 3],
              [np.nan, 2, 3],
              [1, np.nan, 3],
              [np.nan, np.nan, np.nan],
          ]
      )
  
      assert count_rows_with_nans(data_1_row) == 0
      assert count_rows_with_nans(data_2_rows) == 2
      assert count_rows_with_nans(data_3_rows) == 3
  
file_path: yellowbrick/tests/test_utils/test_nan_warnings.py
imports: import numpy
  import pytest
  from yellowbrick.exceptions import DataWarning
  from yellowbrick.utils.nan_warnings import count_nan_elements, count_rows_with_nans, warn_if_nans_exist, filter_missing
label_desc: Use image node_id 2 for calling a global function with example usage: test_count_rows_in_2d_arrays_with_nans() without return types