code: def _hide_ufunc_warnings(ufunc):
      # pandas raises warnings for some inputs to the following ufuncs:
      name = ufunc.__name__
      if name in {
          "arccos",
          "arccosh",
          "arcsin",
          "arctanh",
          "fmod",
          "log",
          "log10",
          "log2",
          "reciprocal",
      }:
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore",
                  f"invalid value encountered in {name}",
                  category=RuntimeWarning,
              )
              warnings.filterwarnings(
                  "ignore",
                  f"divide by zero encountered in {name}",
                  category=RuntimeWarning,
              )
              yield
      else:
          yield
  
file_path: cudf/python/cudf/cudf/tests/test_array_ufunc.py
imports: import operator
  import warnings
  from contextlib import contextmanager
  from functools import reduce
  import cupy
  import numpy
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import assert_eq, set_random_null_mask_inplace
label_desc: Use image node_id 1 for calling a global function with example usage: _hide_ufunc_warnings(ufunc) without return types