code: def dstn(
      x,
      type=2,
      shape=None,
      axes=None,
      norm=None,
      overwrite_x=False,
      planner_effort=None,
      threads=None,
      auto_align_input=True,
      auto_contiguous=True,
  ):
      """
      Perform an nD discrete sine transform.
  
      The first six arguments are as per :func:`scipy.fftpack.dstn`;
      the rest of the arguments are documented in the
      :ref:`additional arguments docs<interfaces_additional_args>`.
  
      Warning: `scipy.fftpack` is considered legacy, new code should
      use `scipy.fft` instead.
  
      """
      shape = _good_shape(x, shape, axes)
      if norm not in [None, "ortho"]:
          raise ValueError(
              f"Invalid norm value {norm}; should be None " 'or "ortho"'
          )
      return _dstn(
          x,
          type,
          shape,
          axes,
          norm,
          overwrite_x,
          planner_effort,
          threads,
          auto_align_input,
          auto_contiguous,
      )
  
imports: import itertools
  import math
  from numbers import Number
  import operator
  from .None import numpy_fft
  from ..builders._utils import _default_effort, _default_threads, _cook_nd_args
  from ._utils import _Xfftn
  import numpy
  from scipy.fftpack import diff, tilbert, itilbert, hilbert, ihilbert, cs_diff, sc_diff, ss_diff, cc_diff, shift, fftshift, ifftshift, fftfreq, rfftfreq, convolve
  from ..pyfftw import next_fast_len
label_desc: Use image node_id 30 for calling a global function with example usage: dstn(x, type, shape, axes, norm, overwrite_x, planner_effort, threads, auto_align_input, auto_contiguous) and returns: _dstn