code: def test_static_tensor_array_split():
      def run(dtype, shape, value_shape=None, lengths_shape=None):
          mod = tvm.IRModule()
          p = Prelude(mod)
          static_tensor_array_ops = StaticTensorArrayOps(
              p, dtype, shape
          )
          static_tensor_array_ops.register()
          if value_shape is not None or lengths_shape is not None:
              static_tensor_array_ops.define_tensor_array_split(
                  value_shape, lengths_shape, False
              )
  
          # tensor array
          v1 = relay.var("v1")
          v2 = relay.var("v2")
          v3 = relay.var("v2")
  
          adt_shape = [
              relay.Any(),
          ] + shape[1:]
          test_ops = StaticTensorArrayOps(p, dtype, adt_shape)
          test_ops.register()
          tensor_array = test_ops.get_global_var("tensor_array")
  
          tensor_array1 = tensor_array(relay.const(3))
          write_func = test_ops.get_global_var("tensor_array_write")
          split_ops = StaticTensorArrayOps(p, dtype, shape)
          split_ops.register()
          split_func = split_ops.get_global_var("tensor_array_split")
          tensor = p.get_tensor_ctor_static(
              "tensor_constructor", dtype, test_ops.shape
          )
          tensor_array1 = write_func(
              tensor_array1, relay.const(0), tensor(v1)
          )
          tensor_array1 = write_func(
              tensor_array1, relay.const(1), tensor(v2)
          )
          tensor_array1 = write_func(
              tensor_array1, relay.const(2), tensor(v3)
          )
  
          # value tensor
          value = relay.var("value")
  
          # lengths tensor
          ta_len = relay.var("length")
  
          # create the split function
          if value_shape is None:
              tensor1 = p.get_tensor_ctor_static(
                  "tensor_constructor", dtype, shape
              )
          else:
              static_tensor_array_ops = StaticTensorArrayOps(
                  p, dtype, value_shape
              )
              static_tensor_array_ops.register()
              tensor1 = p.get_tensor_ctor_static(
                  "tensor_constructor", dtype, test_ops.shape
              )
  
          tensor_array_split = split_func(
              tensor_array1, tensor1(value), ta_len
          )
          mod["main"] = relay.Function(
              [v1, v2, v3, value, ta_len], tensor_array_split
          )
  
          # initialize and check
          v1_data = np.random.uniform(
              low=0.0, high=8.0, size=[2, 3]
          ).astype(dtype)
          v2_data = np.random.uniform(
              low=0.0, high=8.0, size=[2, 3]
          ).astype(dtype)
          v3_data = np.random.uniform(
              low=0.0, high=8.0, size=[2, 3]
          ).astype(dtype)
          value_data = np.random.uniform(
              low=0.0, high=8.0, size=value_shape or shape
          ).astype(dtype)
          length_data = np.array([2, 2], dtype="int32")
          expected = np.concatenate([value_data, v3_data])
          expected = np.split(expected, indices_or_sections=[2, 4])
          check_tensor_array(
              mod,
              expected,
              *(v1_data, v2_data, v3_data, value_data, length_data),
              dtype=dtype,
          )
  
      run("float32", [4, 3])
      run("int32", [4, 3])
      run(
          "int32",
          [relay.Any(), 3],
          [4, 3],
          [
              2,
          ],
      )
  
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay import testing
  from tvm.relay.backend.interpreter import ConstructorValue
  from tvm.relay import create_executor
  from tvm.relay.prelude import Prelude, StaticTensorArrayOps
  from tvm.relay.testing import count, make_nat_value, make_nat_expr
  import numpy
label_desc: Use image node_id 22 for calling a global function with example usage: test_static_tensor_array_split() without return types