code: def test_rng_check_w_old_and_new_keys(self):
      # random.key always returns a new-style typed PRNG key.
      key = random.key(0)
      self.assertTrue(scope._is_valid_rng(key))
      self.assertFalse(scope._is_valid_rng(random.split(key)))
  
      # random.PRNGKey returns an old-style uint32 key by default.
      old_key = random.PRNGKey(0)
      self.assertTrue(scope._is_valid_rng(old_key))
      self.assertFalse(scope._is_valid_rng(random.split(old_key)))
  
      # Also explicitly test raw key data, because the jax_enable_custom_prng
      # flag can make PRNGKey return new-style keys.
      raw_key = random.key_data(key)
      self.assertTrue(scope._is_valid_rng(raw_key))
      self.assertFalse(scope._is_valid_rng(random.split(raw_key)))
  
imports: import jax
  import numpy
  from absl.testing import absltest
  from jax import numpy
  from jax import random
  from flax import errors
  from flax.configurations import temp_flip_flag
  from flax.core import Scope, apply, freeze, init, lazy_init, nn, scope
  from flax.core.scope import LazyRng
label_desc: Use image node_id 13 for calling the ScopeTest obj's underlying member method code with example usage: obj.test_rng_check_w_old_and_new_keys() without return types