code: def test_bnn_forward_with_torch_model():
      torch.manual_seed(0)
      model = SimpleTorchModel().to(device)
      configure_list = [
          {
              "target_names": ["_input_", "weight", "_output_"],
              "op_names": ["fc1", "fc2"],
              "quant_dtype": None,
              "quant_scheme": "affine",
              "granularity": "default",
          },
          {
              "target_names": ["_input_", "weight", "_output_"],
              "op_names": ["conv1", "conv2", "conv3"],
              "quant_dtype": None,
              "quant_scheme": "affine",
              "granularity": "default",
              "fuse_names": [
                  ("conv1", "bn1"),
                  ("conv2", "bn2"),
                  ("conv3", "bn3"),
              ],
          },
      ]
      evaluator = create_pytorch_evaluator(model)
      quantizer = BNNQuantizer(model, configure_list, evaluator)
      quantizer.compress(None, 1)
  
file_path: nni/test/algo/compression/quantization/bnn_test.py
imports: from __future__ import annotations
  import pytest
  import functools
  from typing import Callable, Union, List, Dict, Tuple
  import torch
  import torch.nn.functional
  from torch.optim import Optimizer
  from torch.utils.data import DataLoader
  from torch import Tensor
  import nni
  from nni.compression.quantization import BNNQuantizer
  from nni.compression.utils import TorchEvaluator
  from ..assets.simple_mnist import SimpleTorchModel, SimpleLightningModel, create_lighting_evaluator, create_pytorch_evaluator
  from ..assets.device import device
label_desc: Use image node_id 1 for calling a global function with example usage: test_bnn_forward_with_torch_model() without return types