code: def test_bad_parent_values_on_cpu():
      # (batch_size = 1, max_time = 4, beams = 3)
      # bad parent in beam 1 time 1
      end_token = 10
      step_ids = _transpose_batch_time(
          [[[1, 2, 3], [4, 5, 6], [7, 8, 9], [-1, -1, -1]]]
      )
      parent_ids = _transpose_batch_time(
          [[[0, 0, 0], [0, -1, 1], [2, 1, 2], [-1, -1, -1]]]
      )
      max_sequence_lengths = [3]
  
      with pytest.raises(
          tf.errors.InvalidArgumentError, match="parent id"
      ):
          _ = gather_tree(
              step_ids=step_ids,
              parent_ids=parent_ids,
              max_sequence_lengths=max_sequence_lengths,
              end_token=end_token,
          )
  
file_path: addons/tensorflow_addons/seq2seq/tests/beam_search_ops_test.py
imports: import itertools
  import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.seq2seq import gather_tree
label_desc: Use image node_id 3 for calling a global function with example usage: test_bad_parent_values_on_cpu() without return types