code: def test_missing_in_the_middle():
      mod = tvm.IRModule()
      p = Prelude(mod)
      _, cons, nil = mod.get_type("List")
  
      v = relay.Var("v")
      match = relay.Match(
          v,
          [
              # list of length exactly 1
              relay.Clause(
                  relay.PatternConstructor(
                      cons,
                      [
                          relay.PatternWildcard(),
                          relay.PatternConstructor(nil, []),
                      ],
                  ),
                  v,
              ),
              # empty list
              relay.Clause(relay.PatternConstructor(nil, []), v),
              # list of length 3 or more
              relay.Clause(
                  relay.PatternConstructor(
                      cons,
                      [
                          relay.PatternWildcard(),
                          relay.PatternConstructor(
                              cons,
                              [
                                  relay.PatternWildcard(),
                                  relay.PatternConstructor(
                                      cons,
                                      [
                                          relay.PatternWildcard(),
                                          relay.PatternWildcard(),
                                      ],
                                  ),
                              ],
                          ),
                      ],
                  ),
                  v,
              ),
          ],
      )
  
      # fails to match a list of length exactly two
      unmatched = unmatched_cases(match, mod)
      assert len(unmatched) == 1
      assert isinstance(unmatched[0], relay.PatternConstructor)
      assert unmatched[0].constructor == cons
      assert isinstance(
          unmatched[0].patterns[1], relay.PatternConstructor
      )
      assert unmatched[0].patterns[1].constructor == cons
      assert isinstance(
          unmatched[0].patterns[1].patterns[1], relay.PatternConstructor
      )
      assert unmatched[0].patterns[1].patterns[1].constructor == nil
  
file_path: tvm/tests/python/relay/test_pass_unmatched_cases.py
imports: import tvm
  from tvm import te
  from tvm import relay
  from tvm.relay.prelude import Prelude
  from tvm.relay.analysis import unmatched_cases
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_missing_in_the_middle() without return types