code: def test_as_column_scalar_with_nan(nan_as_null, scalar, size):
      expected = (
          cudf.Series([scalar] * size, nan_as_null=nan_as_null)
          .dropna()
          .to_numpy()
      )
  
      got = (
          cudf.Series(
              as_column(scalar, length=size, nan_as_null=nan_as_null)
          )
          .dropna()
          .to_numpy()
      )
  
      np.testing.assert_equal(expected, got)
  
imports: import cupy
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf._lib.transform import mask_to_bools
  from cudf.core.column.column import as_column
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
  from cudf.utils import dtypes
label_desc: Use image node_id 9 for calling a global function with example usage: test_as_column_scalar_with_nan(nan_as_null, scalar, size) without return types