code: def test_filter():
      a = relay.TypeVar("a")
      expected_type = relay.FuncType(
          [relay.FuncType([a], relay.scalar_type("bool")), rlist(a)],
          rlist(a),
          [a],
      )
      assert prelude.mod[filter].checked_type == expected_type
  
      x = relay.Var("x", nat())
      greater_than_one = relay.Function(
          [x],
          relay.Match(
              x,
              [
                  relay.Clause(
                      relay.PatternConstructor(
                          s,
                          [
                              relay.PatternConstructor(
                                  s, [relay.PatternWildcard()]
                              )
                          ],
                      ),
                      relay.const(True),
                  ),
                  relay.Clause(
                      relay.PatternWildcard(), relay.const(False)
                  ),
              ],
          ),
      )
      res = eval(
          filter(
              greater_than_one,
              cons(
                  make_nat_expr(prelude, 1),
                  cons(
                      make_nat_expr(prelude, 1),
                      cons(
                          make_nat_expr(prelude, 3),
                          cons(
                              make_nat_expr(prelude, 1),
                              cons(
                                  make_nat_expr(prelude, 5),
                                  cons(
                                      make_nat_expr(prelude, 1), nil()
                                  ),
                              ),
                          ),
                      ),
                  ),
              ),
          )
      )
      filtered = to_list(res)
      assert len(filtered) == 2
      assert count(filtered[0]) == 3
      assert count(filtered[1]) == 5
  
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_filter() without return types