class_docstr: Abstract base class for Distributional RL value ops tests.
docstr: Check class constructor raises exception if an input tensor is invalid.
  
  Args:
    nt: namedtuple to be tested.
    inputs: list of (valid) inputs to class constructor.
    invalid_inputs: list of invalid alternative inputs. Should be of same
      length as `inputs`, so that each input can be swapped out for a broken
      input individually.
    nt_name: A string specifying the name of the namedtuple.
docstr_tok: ["Check","class","constructor","raises","exception","if","an","input","tensor","is","invalid",".","Args",":","nt",":","namedtuple","to","be","tested",".","inputs",":","list","of","(","valid",")","inputs","to","class","constructor",".","invalid_inputs",":","list","of","invalid","alternative","inputs",".","Should","be","of","same","length","as","`","inputs","`",",","so","that","each","input","can","be","swapped","out","for","a","broken","input","individually",".","nt_name",":","A","string","specifying","the","name","of","the","namedtuple","."]
code: def assertEachInputRankAndCompatibilityChecked(
      self, nt, inputs, invalid_inputs, nt_name
  ):
      """Check class constructor raises exception if an input tensor is invalid.
  
      Args:
        nt: namedtuple to be tested.
        inputs: list of (valid) inputs to class constructor.
        invalid_inputs: list of invalid alternative inputs. Should be of same
          length as `inputs`, so that each input can be swapped out for a broken
          input individually.
        nt_name: A string specifying the name of the namedtuple.
      """
      for i, alt_input in enumerate(invalid_inputs):
          broken_inputs = list(inputs)
          broken_inputs[i] = alt_input
          with self.assertRaisesRegexp(
              ValueError,
              "{}: Error in rank and/or compatibility check".format(
                  nt_name
              ),
          ):
              nt(*broken_inputs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow.compat.v1
  from trfl import dist_value_ops
label_desc: Use image node_id 2 for calling the CategoricalDistRLTest obj's underlying member method code with example usage: obj.assertEachInputRankAndCompatibilityChecked(nt, inputs, invalid_inputs, nt_name) without return types