code: def test_to_pandas_nullable_bool():
      gsr_not_null = cudf.Series([True, False, True])
      gsr_has_null = cudf.Series([True, False, None])
  
      psr_not_null = pd.Series([True, False, True], dtype="bool")
      psr_has_null = pd.Series([True, False, None], dtype="boolean")
  
      assert_eq(gsr_not_null.to_pandas(), psr_not_null)
      assert_eq(gsr_has_null.to_pandas(nullable=True), psr_has_null)
  
imports: import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import NUMERIC_TYPES, assert_eq
  from cudf.utils.dtypes import np_dtypes_to_pandas_dtypes
label_desc: Use image node_id 4 for calling a global function with example usage: test_to_pandas_nullable_bool() without return types