code: def make_pattern_with_optional():
      r"""Create a pattern to match the following graph. Note that relu is optinal.
  
       conv2d
         |
      bias_add
         |
       (relu)
      """
      x = wildcard()
      y = wildcard()
      z = wildcard()
      conv_node = is_op("nn.conv2d")(x, y)
      bias_node = is_op("nn.bias_add")(conv_node, z)
      r = bias_node.optional(lambda x: is_op("nn.relu")(x))
      return r
  
imports: import pytest
  import tvm
  from tvm import relay, tir
  from tvm.relay.dataflow_pattern import TuplePattern, TupleGetItemPattern, is_op, wildcard
  from tvm.relay.testing import run_opt_pass
label_desc: Use image node_id 4 for calling a global function with example usage: make_pattern_with_optional() and returns: r