code: def test_gradient_penalty_loss_with_wrong_input_types_raises(self):
      discriminator = tf.keras.Sequential()
  
      with self.assertRaisesRegex(
          TypeError,
          "should either both be a tf.Tensor "
          "or both a sequence of tf.Tensor",
      ):
          losses.gradient_penalty_loss(
              real_data=(tf.ones((1,)),),
              generated_data=tf.ones((1,)),
              discriminator=discriminator,
          )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.projects.gan import losses
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 9 for calling the LossesTest obj's underlying member method code with example usage: obj.test_gradient_penalty_loss_with_wrong_input_types_raises() without return types