code: def is_deprecated(f):
      """
      Check if module `f` is deprecated
  
      Parameters
      ----------
      f : ModuleType
  
      Returns
      -------
      bool
      """
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("error")
          try:
              f(**{"not a kwarg": None})
          except DeprecationWarning:
              return True
          except Exception:
              pass
          return False
  
imports: import copy
  import doctest
  import inspect
  import io
  import os
  import re
  import shutil
  import sys
  import tempfile
  import warnings
  import docutils.core
  from argparse import ArgumentParser
  from contextlib import contextmanager, redirect_stderr
  from doctest import NORMALIZE_WHITESPACE, ELLIPSIS, IGNORE_EXCEPTION_DETAIL
  from docutils.parsers.rst import directives
  import sphinx
  import numpy
  from numpydoc.docscrape_sphinx import get_doc_object
  from sphinx.directives.other import SeeAlso, Only
label_desc: Use image node_id 5 for calling a global function with example usage: is_deprecated(f) and returns: False, True