class_docstr: Utilities to manage information pertaining to quantization of tensors in a PyTorch graph.
docstr: If a node's op doesn't support quantized inputs but gets one, this will wire it to
  receive a dequantized version of it.
docstr_tok: ["If","a","node","'s","op","does","n't","support","quantized","inputs","but","gets","one",",","this","will","wire","it","to","receive","a","dequantized","version","of","it","."]
code: def maybe_handle_quantized_inputs(
      self, node: InternalTorchIRNode
  ) -> None:
      """
      If a node's op doesn't support quantized inputs but gets one, this will wire it to
      receive a dequantized version of it.
      """
  
      op_type = node.kind
      if (
          op_type in {"quantize_per_tensor", "dequantize"}
          or "quantized::" in op_type
      ):
          # Op can handle quantized inputs. Nothing to do here.
          return
  
      for input in node.inputs:
          # In Edge IR, input can be a literal and thus have no name
          if (
              not isinstance(input, str)
              or self.get_quantization_info(input) is None
          ):
              # Not a quantized tensor
              continue
  
          # We need a dequantized version of the input to feed to the op.
          dequantized_var, _ = self.get_dequantized_var(input)
          node.replace_name(input, dequantized_var.name)
  
imports: from collections import OrderedDict
  from typing import List, Optional, Union
  import numpy
  import torch
  from torch.jit._script import RecursiveScriptModule
  from coremltools import _logger
  from coremltools._deps import _HAS_TORCH_EXPORT_API
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.input_types import ImageType, InputType, TensorType
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, Placeholder, Program, types
  from coremltools.converters.mil.mil.types import is_float
  from coremltools.converters.mil.mil.var import Var
  from .._utils import get_output_names
  from .internal_graph import InternalTorchIRGraph, InternalTorchIRNode
  from .ops import TorchFrontend, convert_nodes
  from .quantization_ops import _dequantized_weight
  from .torch_op_registry import _TORCH_OPS_REGISTRY
  from .torchir_passes import flatten_graph_input_values, flatten_graph_output_values, generate_tensor_assignment_ops, remove_getattr_nodes, transform_inplace_ops
  from .torchscript_utils import torch_to_mil_types
label_desc: Use image node_id 4 for calling the QuantizationContext obj's underlying member method code with example usage: obj.maybe_handle_quantized_inputs(node) without return types