code: def test_derive_random_state(mock_derive):
      with warnings.catch_warnings(record=True) as caught_warnings:
          warnings.simplefilter("always")
  
          gen = iarandom.convert_seed_to_generator(1)
          _ = ia.derive_random_state(gen)
  
      mock_derive.assert_called_once_with(gen)
      assert len(caught_warnings) == 1
      assert "is deprecated" in str(caught_warnings[-1].message)
  
imports: from __future__ import print_function, division, absolute_import
  import time
  import warnings
  import sys
  import matplotlib
  import numpy
  import six.moves
  import cv2
  import imgaug
  from imgaug import dtypes
  import imgaug.random
  from imgaug.testutils import assertWarns
label_desc: Use image node_id 21 for calling a global function with example usage: test_derive_random_state(mock_derive) without return types