code: def test_fuse_conv2d_batchnorm2d():
      model = AutoModelForImageClassification.from_pretrained(
          "fxmarty/resnet-tiny-beans"
      )
  
      traced_model = symbolic_trace(
          model, input_names=["pixel_values"], disable_check=True
      )
  
      num_batchnorm2d = sum(
          1 if isinstance(mod, torch.nn.BatchNorm2d) else 0
          for mod in traced_model.modules()
      )
      assert (
          num_batchnorm2d != 0
      ), "there should be at least one BatchNorm2d in the model to actually perform the test"
  
      transformation = FuseBatchNorm2dInConv2d()
      transformed_model = transformation(traced_model)
  
      num_batchnorm2d = sum(
          1 if isinstance(mod, torch.nn.BatchNorm2d) else 0
          for mod in transformed_model.modules()
      )
      assert (
          num_batchnorm2d == 0
      ), "there should be no BatchNorm2d left in the model after the transformation"
  
imports: import operator
  import unittest
  import torch
  from parameterized import parameterized
  from transformers import AutoModel, AutoModelForImageClassification, AutoTokenizer, BertModel
  from transformers.models.bert.modeling_bert import BertSelfAttention
  from transformers.utils.fx import symbolic_trace
  from optimum.fx.optimization import ChangeTrueDivToMulByInverse, FuseBatchNorm1dInLinear, FuseBatchNorm2dInConv2d, FuseBiasInLinear, MergeLinears, ReversibleTransformation, Transformation, compose
  from optimum.fx.utils import are_fx_features_available
label_desc: Use image node_id 5 for calling a global function with example usage: test_fuse_conv2d_batchnorm2d() without return types