code: def test_safe_isnan():
      assert np.array_equal(
          safe_isnan([1, True, None, np.nan, "asdf"]),
          [False, False, False, True, False],
      )
      assert safe_isnan(np.nan).ndim == 0
      assert safe_isnan(np.nan)
      assert not safe_isnan(None)
      # raw isnan raises a *different* error for strings than for objects:
      assert not safe_isnan("asdf")
  
imports: import sys
  import numpy
  import six
  from six.moves import cStringIO
  from .compat import optional_dep_ok
label_desc: Use image node_id 20 for calling a global function with example usage: test_safe_isnan() without return types