code: def test_if_imbalanced_illegal(
      self, target, a, type_, exc_type, exc_regex
  ):
      a = type_(a)
      with self.assertRaisesRegex(exc_type, exc_regex):
          tf.function(target)(a)
  
imports: import itertools
  from absl.testing import parameterized
  import tensorflow
  from tensorflow.python.autograph.tests import reference_test_base
label_desc: Use image node_id 3 for calling the ReferenceTest obj's underlying member method code with example usage: obj.test_if_imbalanced_illegal(target, a, type_, exc_type, exc_regex) without return types