code: def test_compute_stacked_offsets(self):
      sizes = np.array([5, 4, 3, 1, 2, 0, 3, 0, 4, 7])
      repeats = [2, 2, 0, 2, 1, 3, 2, 0, 3, 2]
      offsets0 = utils_np._compute_stacked_offsets(sizes, repeats)
      offsets1 = utils_np._compute_stacked_offsets(
          sizes, np.array(repeats)
      )
      expected_offsets = [
          0,
          0,
          5,
          5,
          12,
          12,
          13,
          15,
          15,
          15,
          15,
          15,
          18,
          18,
          18,
          22,
          22,
      ]
      self.assertAllEqual(expected_offsets, offsets0.tolist())
      self.assertAllEqual(expected_offsets, offsets1.tolist())
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  from graph_nets import utils_np
  from graph_nets.tests import test_utils
  import networkx
  import numpy
  from six.moves import range
  import tensorflow
label_desc: Use image node_id 1 for calling the ConcatenationTest obj's underlying member method code with example usage: obj.test_compute_stacked_offsets() without return types