code: def _is_input_arg_dtype_supported_by_backend(
      arg: Argument,
      node: Node,
      qconfig: QConfigAny,
      dtype_config: DTypeConfig,
      backend_config: BackendConfig,
  ) -> bool:
      """Check if the configured qconfig for the argument
      is supported by the backend or not
      """
      if isinstance(arg, (list, tuple)):
          return all(
              _is_input_arg_dtype_supported_by_backend(
                  a, node, qconfig, dtype_config, backend_config
              )
              for a in arg
          )
      if not isinstance(arg, Node):
          return True
      # TODO: support check for standalone module
      is_weight = node_arg_is_weight(node, arg)
      is_bias = node_arg_is_bias(node, arg)
      is_activation = not is_weight and not is_bias
      if is_activation:
          input_act_obs_or_fq_ctr = node.meta["target_dtype_info"].get(
              "input_act_obs_or_fq_ctr"
          )
          input_act_obs_or_fq = (
              input_act_obs_or_fq_ctr()
              if input_act_obs_or_fq_ctr
              else None
          )
          qconfig_dtype, qconfig_is_dynamic = _get_dtype_and_is_dynamic(
              input_act_obs_or_fq
          )
          # TODO(future PR): remove the cast to bool below after figuring
          # out why backend_config has is_dynamic set to None in some cases.
          return (dtype_config.input_dtype is None) or (
              dtype_config.input_dtype == qconfig_dtype
              and bool(dtype_config.is_dynamic)
              == bool(qconfig_is_dynamic)
              and _qconfig_satisfies_dtype_config_constraints(
                  qconfig, dtype_config.input_dtype_with_constraints
              )
          )
      elif is_weight:
          # TODO: move dtype check into `_qconfig_satisfies_dtype_config_constraints` as well
          weight_obs_or_fq_ctr = node.meta["target_dtype_info"].get(
              "weight_obs_or_fq_ctr", None
          )
          weight_obs_or_fq = (
              weight_obs_or_fq_ctr() if weight_obs_or_fq_ctr else None
          )
          qconfig_weight_dtype, _ = _get_dtype_and_is_dynamic(
              weight_obs_or_fq
          )
          backend_config_weight_dtype = dtype_config.weight_dtype
          dtype_matches = (
              qconfig_weight_dtype == backend_config_weight_dtype
          )
          qconfig_satisfies_constraints = (
              _qconfig_satisfies_dtype_config_constraints(
                  qconfig,
                  dtype_config.weight_dtype_with_constraints,
                  is_activation=False,
              )
          )
          return backend_config_weight_dtype is None or (
              dtype_matches and qconfig_satisfies_constraints
          )
      else:  # bias
          # TODO: move dtype check into `_qconfig_satisfies_dtype_config_constraints` as well
          bias_obs_or_fq_ctr = node.meta["target_dtype_info"].get(
              "bias_obs_or_fq_ctr", None
          )
          bias_obs_or_fq = (
              bias_obs_or_fq_ctr() if bias_obs_or_fq_ctr else None
          )
          qconfig_bias_dtype, _ = _get_dtype_and_is_dynamic(
              bias_obs_or_fq
          )
          backend_config_bias_dtype = dtype_config.bias_dtype
          return (
              backend_config_bias_dtype is None
              or qconfig_bias_dtype == backend_config_bias_dtype
          )
  
imports: import copy
  import torch
  import warnings
  from torch.fx import GraphModule
  from torch.fx.graph import Graph, Node
  from torch.fx.node import Argument
  from ..quantize import propagate_qconfig_
  from ..observer import _is_activation_post_process, _PartialWrapper
  from ..qconfig import _is_reuse_input_qconfig, QConfigAny
  from ..qconfig_mapping import QConfigMapping
  from .qconfig_mapping_utils import _generate_node_name_to_qconfig, _update_qconfig_for_fusion, _get_flattened_qconfig_dict, _update_qconfig_for_qat
  from .quantize_handler import _default_root_node_getter, _get_pattern_to_quantize_handlers, QuantizeHandler
  from torch.ao.quantization import ObserverBase, FixedQParamsObserver, FixedQParamsFakeQuantize, _DerivedObserverOrFakeQuantize
  from torch.ao.quantization.utils import Pattern, NodePattern
  from ._equalize import is_equalization_observer, node_supports_equalization
  from .pattern_utils import _sorted_patterns_dict
  from .match_utils import _MatchResultWithQConfig, _find_matches
  from .utils import _insert_dequant_stubs_for_custom_module_lstm_output, _is_custom_module_lstm, _maybe_get_custom_module_lstm_from_node_arg, _qconfig_satisfies_dtype_config_constraints, get_custom_module_class_keys, all_node_args_have_no_tensors, assert_and_get_unique_device, get_non_observable_arg_indexes_and_types, get_new_attr_name_with_prefix, node_arg_is_weight, node_arg_is_bias, NON_QUANTIZABLE_WEIGHT_OPS, ObservedGraphModuleAttrs
  from torch.ao.quantization import PlaceholderObserver
  from torch.ao.quantization.quantize import convert
  from ..utils import _parent_name, get_qconfig_dtypes, get_swapped_custom_module_class
  from ..backend_config.utils import get_pattern_to_dtype_configs, get_module_to_qat_module, get_fusion_pattern_to_root_node_getter
  from ..backend_config import BackendConfig, DTypeConfig, get_native_backend_config
  from .custom_config import PrepareCustomConfig, StandaloneModuleConfigEntry
  from torch.ao.quantization.quantizer import EdgeOrNode, QuantizationSpec, QuantizationSpecBase, FixedQParamsQuantizationSpec, SharedQuantizationSpec, DerivedQuantizationSpec
  from torch.ao.quantization import ObserverOrFakeQuantize
  from torch._subclasses import FakeTensor
  from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
  from dataclasses import asdict
label_desc: Use image node_id 7 for calling a global function with example usage: _is_input_arg_dtype_supported_by_backend(arg, node, qconfig, dtype_config, backend_config) and returns: all, True, unknown, unknown, unknown