parameters: (self, flat_values)
return_statement: return flat_values
docstring: Test if flat_values have the right nvals dynamically.
docstring_summary: Test if flat_values have the right nvals dynamically.
docstring_tokens: Test if flat_values have the right nvals dynamically .
function: def _validate_flat_values_dynamically(self, flat_values):
      """Test if flat_values have the right nvals dynamically."""
      if self.row_partitions:
        assert_op = check_ops.assert_equal(
            self.row_partitions[-1].nvals(),
            array_ops.shape(flat_values, out_type=self.dtype)[0],
            message="Last row partition does not match flat_values.")
        return control_flow_ops.with_dependencies([assert_op], flat_values)
      return flat_values
function_tokens: def _validate_flat_values_dynamically ( self , flat_values ) : if self . row_partitions : assert_op = check_ops . assert_equal ( self . row_partitions [ - 1 ] . nvals ( ) , array_ops . shape ( flat_values , out_type = self . dtype ) [ 0 ] , message = "Last row partition does not match flat_values." ) return control_flow_ops . with_dependencies ( [ assert_op ] , flat_values ) return flat_values