code: def pop_quant_desc_in_kwargs(quant_cls, input_only=False, **kwargs):
      """Pop quant descriptors in kwargs
  
      If there is no descriptor in kwargs, the default one in quant_cls will be used
  
      Arguments:
         quant_cls: A class that has default quantization descriptors
         input_only: A boolean. If True, pop quant_desc_input only, not quant_desc_weight. Default false.
  
      Keyword Arguments:
         quant_desc_input: An instance of :class:`QuantDescriptor <csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor>`.
             Quantization descriptor of input.
         quant_desc_weight: An instance of :class:`QuantDescriptor <csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor>`.
             Quantization descriptor of weight.
      """
      quant_desc_input = kwargs.pop(
          "quant_desc_input", quant_cls.default_quant_desc_input
      )
      if not input_only:
          quant_desc_weight = kwargs.pop(
              "quant_desc_weight", quant_cls.default_quant_desc_weight
          )
  
      # Check if anything is left in **kwargs
      if kwargs:
          raise TypeError("Unused keys: {}".format(kwargs.keys()))
  
      if input_only:
          return quant_desc_input
      return quant_desc_input, quant_desc_weight
  
file_path: lightseq/lightseq/csrc/pytorch/pytorch_quantization/nn/modules/_utils.py
imports: import copy
  import inspect
  import logging
  from torch import nn
  from csrc.pytorch.pytorch_quantization.nn import TensorQuantizer
  from csrc.pytorch.pytorch_quantization.tensor_quant import QuantDescriptor, QUANT_DESC_8BIT_PER_TENSOR
label_desc: Use image node_id 1 for calling a global function with example usage: pop_quant_desc_in_kwargs(quant_cls, input_only) and returns: quant_desc_input,  quant_desc_weight, quant_desc_input