code: def ignore_warnings(category):
      """Returns a decorator to ignore all warnings
      in the specified category.
  
      Parameters
      ----------
      category : class
          Any warning that is a subclass of this category is ignored.
  
      Returns
      -------
      decorator_ignore : function
          A decorator that ignores all warnings in the category.
      """
  
      def decorator_ignore(fn):
          @functools.wraps(fn)
          def fn_ignore(*args, **kwargs):
              with warnings.catch_warnings():
                  warnings.simplefilter("ignore", category)
                  return fn(*args, **kwargs)
  
          return fn_ignore
  
      return decorator_ignore
  
imports: import copy
  import dataclasses
  import functools
  import math
  import re
  import warnings
  from dataclasses import field
  from typing import List
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from pandas.testing import assert_index_equal
  from pandas.testing import assert_series_equal
label_desc: Use image node_id 15 for calling a global function with example usage: ignore_warnings(category) and returns: decorator_ignore, fn_ignore, fn