class_docstr: Test case class implementing extra test functionalities.
class_docstr_tok: ["Test","case","class","implementing","extra","test","functionalities","."]
docstr: Runs the function to make sure an exception is raised.
  
  Args:
    func: A function to exectute.
    error_msg: The error message of the exception.
    shapes: A tuple or list of the input shapes.
    dtypes: A list of input types.
    sparse_tensors: A list of `bool` indicating if the inputs are
      SparseTensors. Defaults to all `False`. This is used for creating
      SparseTensor placeholders in graph mode.
    **kwargs: A dict of keyword arguments to be passed to the function.
docstr_tok: ["Runs","the","function","to","make","sure","an","exception","is","raised",".","Args",":","func",":","A","function","to","exectute",".","error_msg",":","The","error","message","of","the","exception",".","shapes",":","A","tuple","or","list","of","the","input","shapes",".","dtypes",":","A","list","of","input","types",".","sparse_tensors",":","A","list","of","`","bool","`","indicating","if","the","inputs","are","SparseTensors",".","Defaults","to","all","`","False","`",".","This","is","used","for","creating","SparseTensor","placeholders","in","graph","mode",".","*","*","kwargs",":","A","dict","of","keyword","arguments","to","be","passed","to","the","function","."]
code: def assert_exception_is_raised(
      self,
      func,
      error_msg,
      shapes,
      dtypes=None,
      sparse_tensors=None,
      **kwargs,
  ):
      """Runs the function to make sure an exception is raised.
  
      Args:
        func: A function to exectute.
        error_msg: The error message of the exception.
        shapes: A tuple or list of the input shapes.
        dtypes: A list of input types.
        sparse_tensors: A list of `bool` indicating if the inputs are
          SparseTensors. Defaults to all `False`. This is used for creating
          SparseTensor placeholders in graph mode.
        **kwargs: A dict of keyword arguments to be passed to the function.
      """
      if tf.executing_eagerly():
          # If shapes is an empty list, we can continue with the test. If shapes
          # has None values, we shoud return.
          shapes = self._remove_dynamic_shapes(shapes)
          if shapes is None:
              return
      placeholders = self._create_placeholders_from_shapes(
          shapes=shapes, dtypes=dtypes, sparse_tensors=sparse_tensors
      )
      with self.assertRaisesRegex(ValueError, error_msg):
          func(*placeholders, **kwargs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import warnings
  from absl import flags
  from absl.testing import parameterized
  import numpy
  from six.moves import zip
  import tensorflow
  from tensorflow_graphics.util import tfg_flags
label_desc: Use image node_id 7 for calling the TestCase obj's underlying member method code with example usage: obj.assert_exception_is_raised(func, error_msg, shapes, dtypes, sparse_tensors) without return types