code: def unpack_quantized_tensor(value, cast_onnx_accepted=True):
      if (
          isinstance(value, torch.Tensor)
          and value.dtype in _qtype_vtype_map
      ):
          q_value_dequantize = value.dequantize()
          q_scale = (
              torch.tensor(value.q_scale(), dtype=torch.double)
              if cast_onnx_accepted
              else torch.tensor(value.q_scale(), dtype=torch.float32)
          )
          q_zero_point = (
              torch.tensor(value.q_zero_point(), dtype=torch.int64)
              if cast_onnx_accepted
              else torch.tensor(
                  value.q_zero_point(),
                  dtype=_qtype_vtype_map[value.dtype],
              )
          )
          q_value = q_value_dequantize / q_scale + q_zero_point
          q_value = q_value.to(dtype=_qtype_vtype_map[value.dtype])
          return q_value, q_scale, q_zero_point
      else:
          return (value,)
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import inspect
  import io
  import re
  import textwrap
  import typing
  import warnings
  from typing import Any, Callable, cast, Collection, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Type, Union
  import torch
  import torch._C._onnx
  import torch.jit._trace
  import torch.serialization
  from torch import _C
  from torch.onnx import _constants, _exporter_states, errors, symbolic_caffe2, symbolic_helper
  from torch.onnx._globals import GLOBALS
  from torch.onnx._internal import _beartype, diagnostics, jit_utils, onnx_proto_utils, registration
label_desc: Use image node_id 24 for calling a global function with example usage: unpack_quantized_tensor(value, cast_onnx_accepted) and returns: q_value,  q_scale,  q_zero_point, value