code: def test_static_tensor_take():
      def run(dtype, shape):
          mod = tvm.IRModule()
          p = Prelude(mod)
          static_tensor_array_ops = StaticTensorArrayOps(
              p, dtype, shape
          )
          static_tensor_array_ops.register()
  
          take = p.get_global_var_static("tensor_take", dtype, shape)
          tensor_constructor = p.get_tensor_ctor_static(
              "tensor_constructor", dtype, shape
          )
          v = relay.var("v")
          lower = relay.var("lower")
          upper = relay.var("upper")
          mod["main"] = relay.Function(
              [v, lower, upper],
              take(tensor_constructor(v), lower, upper),
          )
          v_data = np.random.uniform(
              low=0.0, high=8.0, size=shape
          ).astype(dtype)
          expected = [np.take(v_data, range(2, 5), axis=0)]
          check_tensor_array(
              mod, expected, *(v_data, 2, 5), dtype=dtype
          )
          expected = [np.take(v_data, range(0, 9), axis=0)]
          check_tensor_array(
              mod, expected, *(v_data, 0, 9), dtype=dtype
          )
  
      run("float32", [10, 10])
      run("int32", [15, 11])
  
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 14 for calling a global function with example usage: test_static_tensor_take() without return types