class_docstr: Test case class implementing extra test functionalities.
class_docstr_tok: ["Test","case","class","implementing","extra","test","functionalities","."]
docstr: Tests that the function gives the correct result.
  
  Args:
    func: A function to exectute.
    test_inputs: A tuple or list of test inputs.
    test_outputs: A tuple or list of test outputs against which the result of
      calling `func` on `test_inputs` will be compared to.
    rtol: The relative tolerance used during the comparison.
    atol: The absolute tolerance used during the comparison.
    tile: A `bool` indicating whether or not to automatically tile the test
      inputs and outputs.
docstr_tok: ["Tests","that","the","function","gives","the","correct","result",".","Args",":","func",":","A","function","to","exectute",".","test_inputs",":","A","tuple","or","list","of","test","inputs",".","test_outputs",":","A","tuple","or","list","of","test","outputs","against","which","the","result","of","calling","`","func","`","on","`","test_inputs","`","will","be","compared","to",".","rtol",":","The","relative","tolerance","used","during","the","comparison",".","atol",":","The","absolute","tolerance","used","during","the","comparison",".","tile",":","A","`","bool","`","indicating","whether","or","not","to","automatically","tile","the","test","inputs","and","outputs","."]
code: def assert_output_is_correct(
      self,
      func,
      test_inputs,
      test_outputs,
      rtol=1e-3,
      atol=1e-6,
      tile=True,
  ):
      """Tests that the function gives the correct result.
  
      Args:
        func: A function to exectute.
        test_inputs: A tuple or list of test inputs.
        test_outputs: A tuple or list of test outputs against which the result of
          calling `func` on `test_inputs` will be compared to.
        rtol: The relative tolerance used during the comparison.
        atol: The absolute tolerance used during the comparison.
        tile: A `bool` indicating whether or not to automatically tile the test
          inputs and outputs.
      """
      if tile:
          # Creates a rank 4 list of values between 1 and 10.
          tensor_tile = np.random.randint(
              1, 10, size=np.random.randint(4)
          ).tolist()
          test_inputs = self._tile_tensors(tensor_tile, test_inputs)
          test_outputs = self._tile_tensors(tensor_tile, test_outputs)
      test_outputs = [
          tf.convert_to_tensor(value=output) for output in test_outputs
      ]
      test_outputs = (
          test_outputs[0] if len(test_outputs) == 1 else test_outputs
      )
      self.assertAllClose(
          test_outputs, func(*test_inputs), rtol=rtol, atol=atol
      )
  
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 12 for calling the TestCase obj's underlying member method code with example usage: obj.assert_output_is_correct(func, test_inputs, test_outputs, rtol, atol, tile) without return types