code: def test_series_invert(dtype):
      arr = (np.random.random(1000) * 100).astype(dtype)
      sr = Series(arr)
      np.testing.assert_equal((~sr).to_numpy(), np.invert(arr))
      np.testing.assert_equal((~sr).to_numpy(), ~arr)
  
file_path: cudf/python/cudf/cudf/tests/test_unaops.py
imports: import itertools
  import operator
  import re
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import Series
  from cudf.testing import _utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_series_invert(dtype) without return types