code: def test_null_series(nrows, dtype):
      size = 5
      sr = cudf.Series(np.random.randint(1, 9, size)).astype(dtype)
      sr[np.random.choice([False, True], size=size)] = None
      if dtype != "category" and cudf.dtype(dtype).kind in {"u", "i"}:
          ps = pd.Series(
              sr._column.data_array_view(mode="read").copy_to_host(),
              dtype=np_dtypes_to_pandas_dtypes.get(
                  cudf.dtype(dtype), cudf.dtype(dtype)
              ),
          )
          ps[sr.isnull().to_pandas()] = pd.NA
      else:
          ps = sr.to_pandas()
  
      pd.options.display.max_rows = int(nrows)
      psrepr = repr(ps).replace("NaN", "<NA>").replace("None", "<NA>")
      if "UInt" in psrepr:
          psrepr = psrepr.replace("UInt", "uint")
      elif "Int" in psrepr:
          psrepr = psrepr.replace("Int", "int")
      assert psrepr.split() == repr(sr).split()
      pd.reset_option("display.max_rows")
  
imports: import textwrap
  import cupy
  import numpy
  import pandas
  import pytest
  from hypothesis import given, settings, strategies
  import cudf
  from cudf.testing import _utils
  from cudf.utils.dtypes import np_dtypes_to_pandas_dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: test_null_series(nrows, dtype) without return types