code: def make_conv2d_pattern(with_bias=False, with_act=None):
      """Create a pattern for dense op followed by activations."""
      data = wildcard()
      weight = wildcard()
      bias = wildcard()
      conv2d = is_op("nn.conv2d")(data, weight)
      if with_bias:
          add_or_bias_add = is_op("add") | is_op("nn.bias_add")
          conv2d_out = add_or_bias_add(conv2d, bias)
      else:
          conv2d_out = conv2d
  
      if with_act is not None:
          if with_act == "relu":
              return is_op("nn.relu")(conv2d_out)
          if with_act == "sigmoid":
              return is_op("sigmoid")(conv2d_out)
          if with_act == "silu":
              return is_op("multiply")(
                  conv2d_out, is_op("sigmoid")(conv2d_out)
              )
          if with_act == "hardswish":
              rhs = is_op("divide")(
                  is_op("clip")(
                      is_op("add")(conv2d_out, is_constant())
                  ),
                  is_constant(),
              )
              return is_op("multiply")(conv2d_out, rhs)
  
          raise ValueError(f"Unknown activation {with_act}.")
  
      return conv2d_out
  
imports: from functools import partial
  from tvm import relay
  from tvm.ir.transform import PassContext, Sequential
  from tvm.relay import transform
  from tvm.relay.build_module import bind_params_by_name
  from tvm.relay.op.contrib.register import register_pattern_table
  from ...dataflow_pattern import is_constant, is_op, wildcard
label_desc: Use image node_id 4 for calling a global function with example usage: make_conv2d_pattern(with_bias, with_act) and returns: conv2d_out, is_op, is_op, is_op, is_op