code: def _get_bn_configs(
      dtype_configs: List[DTypeConfig],
  ) -> List[BackendPatternConfig]:
      """Get configs related to batchnorm."""
      bn_configs = []
      bn_to_fused_bn = {
          torch.nn.BatchNorm2d: nni.BNReLU2d,
          torch.nn.BatchNorm3d: nni.BNReLU3d,
      }
      for bn in bn_to_fused_bn.keys():
          fused_bn = bn_to_fused_bn[bn]
          # bn module + relu module fusion config
          bn_configs.append(
              BackendPatternConfig((bn, nn.ReLU))
              .set_dtype_configs(dtype_configs)  # noqa: E131
              .set_fuser_method(_sequential_wrapper2(fused_bn))
              .set_fused_module(fused_bn)
          )
          # bn module + F.relu fusion config
          bn_configs.append(
              BackendPatternConfig((bn, F.relu))
              .set_dtype_configs(dtype_configs)  # noqa: E131
              .set_fuser_method(_sequential_wrapper2(fused_bn))
              .set_fused_module(fused_bn)
          )
          bn_configs.append(
              BackendPatternConfig(bn)
              .set_observation_type(
                  ObservationType.OUTPUT_USE_DIFFERENT_OBSERVER_AS_INPUT
              )  # noqa: E131
              .set_dtype_configs(dtype_configs)
          )
  
      # fused bn configs
      for fused_bn in bn_to_fused_bn.values():
          bn_configs.append(
              BackendPatternConfig(fused_bn)
              .set_observation_type(
                  ObservationType.OUTPUT_USE_DIFFERENT_OBSERVER_AS_INPUT
              )  # noqa: E131
              .set_dtype_configs(dtype_configs)
          )
      return bn_configs
  
imports: import copy
  import operator
  import torch
  import torch.nn.functional
  import torch.nn
  import torch.ao.nn.intrinsic
  import torch.ao.nn.intrinsic.qat
  import torch.ao.nn.qat
  import torch.ao.nn.quantized.reference
  from collections import namedtuple
  from typing import Callable, Dict, List, Union
  from .backend_config import BackendPatternConfig, DTypeConfig, DTypeWithConstraints, ObservationType
  from ..fuser_method_mappings import _sequential_wrapper2, fuse_conv_bn, fuse_conv_bn_relu, fuse_linear_bn, fuse_convtranspose_bn
label_desc: Use image node_id 10 for calling a global function with example usage: _get_bn_configs(dtype_configs) and returns: bn_configs