code: def ensure_deprecation_warning(expected_text):
      """Ensure that a decorated function raises a deprecation warning.
  
      Added in 0.5.0.
  
      Parameters
      ----------
      expected_text : str
          Expected text fragment to be found in warning's text.
  
      Returns
      -------
      callable
          Decorated function.
  
      """
  
      def _wrapper_with_args(func):
          @functools.wraps(func)
          def _wrapper(*args, **kwargs):
              with warnings.catch_warnings(
                  record=True
              ) as caught_warnings:
                  func(*args, **kwargs)
  
              assert (
                  len(caught_warnings) == 1
              ), "Expected 1 warning, got %d." % (len(caught_warnings),)
              assert expected_text in str(caught_warnings[-1].message)
  
          return _wrapper
  
      return _wrapper_with_args
  
imports: from __future__ import print_function, division, absolute_import
  import random
  import copy
  import warnings
  import tempfile
  import shutil
  import re
  import sys
  import importlib
  import functools
  import numpy
  import six.moves
  import imgaug
  import imgaug.random
  import imgaug.parameters
  from imgaug.augmentables.kps import KeypointsOnImage
label_desc: Use image node_id 13 for calling a global function with example usage: ensure_deprecation_warning(expected_text) and returns: _wrapper_with_args, _wrapper