code: def get_default_qconfig(backend="x86", version=0):
      """
      Returns the default PTQ qconfig for the specified backend.
  
      Args:
        * `backend` (str): a string representing the target backend. Currently supports
          `x86` (default), `fbgemm`, `qnnpack` and `onednn`.
  
      Return:
          qconfig
      """
      supported_backends = ["fbgemm", "x86", "qnnpack", "onednn"]
      if backend not in supported_backends:
          raise AssertionError(
              "backend: "
              + str(backend)
              + f" not supported. backend must be one of {supported_backends}"
          )
  
      if version == 0:
          if backend == "fbgemm":
              qconfig = QConfig(
                  activation=HistogramObserver.with_args(
                      reduce_range=True
                  ),
                  weight=default_per_channel_weight_observer,
              )
          elif backend == "qnnpack":
              # TODO: make this compatible with xnnpack constraints
              qconfig = QConfig(
                  activation=HistogramObserver.with_args(
                      reduce_range=False
                  ),
                  weight=default_weight_observer,
              )
          elif backend == "onednn":
              if not torch.cpu._is_cpu_support_vnni():
                  warnings.warn(
                      "Default qconfig of oneDNN backend with reduce_range of false may have accuracy issues "
                      "on CPU without Vector Neural Network Instruction support."
                  )
              qconfig = QConfig(
                  activation=HistogramObserver.with_args(
                      reduce_range=False
                  ),
                  weight=default_per_channel_weight_observer,
              )
          elif backend == "x86":
              qconfig = QConfig(
                  activation=HistogramObserver.with_args(
                      reduce_range=True
                  ),
                  weight=default_per_channel_weight_observer,
              )
          else:
              # won't reach
              qconfig = default_qconfig
      else:
          raise AssertionError(
              "Version number: "
              + str(version)
              + " in get_default_qconfig is not supported. Version number must be 0"
          )
  
      return qconfig
  
imports: from collections import namedtuple
  from typing import Optional, Any, Union, Type
  import torch
  import torch.nn
  from torch.ao.quantization.fake_quantize import FakeQuantize, FakeQuantizeBase, default_fake_quant, default_dynamic_fake_quant, default_per_channel_weight_fake_quant, default_weight_fake_quant, default_fused_act_fake_quant, default_fused_wt_fake_quant, FusedMovingAvgObsFakeQuantize, default_fused_per_channel_wt_fake_quant, default_embedding_fake_quant, default_embedding_fake_quant_4bit, fused_wt_fake_quant_range_neg_127_to_127, fused_per_channel_wt_fake_quant_range_neg_127_to_127
  from .observer import _PartialWrapper, MinMaxObserver, HistogramObserver, MovingAverageMinMaxObserver, NoopObserver, PlaceholderObserver, ReuseInputObserver, default_debug_observer, default_dynamic_quant_observer, default_float_qparams_observer, default_float_qparams_observer_4bit, default_observer, default_per_channel_weight_observer, default_placeholder_observer, default_weight_observer, weight_observer_range_neg_127_to_127, per_channel_weight_observer_range_neg_127_to_127, default_reuse_input_observer, ObserverBase
  import warnings
  import copy
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_qconfig(backend, version) and returns: qconfig