code: def make_gemm_pattern(
      with_bias=True, with_act=None, out_dtype="float16"
  ):
      """Create a pattern for dense op followed by activations."""
      data = wildcard()
      weight = wildcard()
      bias = wildcard()
      gemm = is_op("nn.dense")(data, weight)
      if with_bias:
          add_or_bias_add = is_op("add") | is_op("nn.bias_add")
          gemm_out = add_or_bias_add(gemm, bias)
      else:
          gemm_out = gemm
  
      if with_act is None:
          return gemm_out
      if isinstance(with_act, str) and with_act == "relu":
          return is_op("nn.relu")(gemm_out)
  
      assert isinstance(with_act, str) and with_act == "gelu"
      return make_gelu_pattern(gemm_out, out_dtype)
  
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 2 for calling a global function with example usage: make_gemm_pattern(with_bias, with_act, out_dtype) and returns: make_gelu_pattern, gemm_out, is_op