code: def _gs_denormalize(self, n, length: int, align_corners: bool):  # type: ignore
      # n is the normalized coordinate (float)
      # x is the unormalized coordinate (float)
      if align_corners:
          # Align to corners
          # x_min = 0
          # x_max = d-1
          # Linear mapping from [x_min, x_max] to [-1, 1]
          # Solving linear equation n = ax + b
          # a = 2/(d-1)
          # b = -1
          # n = 2/(d-1) x - 1
          # n(d-1) = 2x - (d-1)
          # x = (n+1)(d-1) / 2
          x = (n + 1) / 2.0 * (length - 1)
      else:
          # Not align to corners
          # x_min = -0.5
          # x_max = d-0.5
          # Linear mapping from [x_min, x_max] to [-1, 1]
          # Solving linear equation n = ax + b
          # a = 2/d
          # b = 1/d - 1
          # n = 2/d x + 1/d - 1
          # nd = 2x + 1 - d
          # x = (nd + d - 1) / 2
          # x = ((n + 1) d - 1) / 2
          x = ((n + 1) * length - 1) / 2.0
      return x
  
imports: import numbers
  from typing import List
  import numpy
  from onnx.reference.op_run import OpRun
  from onnx.reference.ops.op_resize import _get_all_coords
label_desc: Use image node_id 1 for calling the GridSample obj's underlying member method code with example usage: obj._gs_denormalize(n, length, align_corners) and returns: x