code: def test_count_nan_elements():
      """Test that nan elements in 1d arrays are counted correctly."""
      data0 = np.array([1, 2, 3])
      data1 = np.array([1, np.nan, 3])
      data3 = np.array([np.nan, np.nan, np.nan])
  
      assert count_nan_elements(data0) == 0
      assert count_nan_elements(data1) == 1
      assert count_nan_elements(data3) == 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 3 for calling a global function with example usage: test_count_nan_elements() without return types