code: def test_na_handling(labels):
      arr = np.arange(0, 0.75, 0.01)
      arr[::3] = np.nan
  
      result = cut(arr, 4, labels=labels)
      result = np.asarray(result)
  
      expected = np.where(isna(arr), np.nan, result)
      tm.assert_almost_equal(result, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import Categorical, DataFrame, DatetimeIndex, Index, Interval, IntervalIndex, Series, TimedeltaIndex, Timestamp, cut, date_range, interval_range, isna, qcut, timedelta_range, to_datetime
  import pandas._testing
  from pandas.api.types import CategoricalDtype
  import pandas.core.reshape.tile
label_desc: Use image node_id 18 for calling a global function with example usage: test_na_handling(labels) without return types