code: def _create_structure_array(structure_array, voxelspacing):
      """
      Convenient function to take a structure array (single number valid for all dimensions
      or a sequence with a distinct number for each dimension) assumed to be in mm and
      returns a structure array (a sequence) adapted to the image space using the supplied
      voxel spacing.
      """
      try:
          structure_array = [
              s / float(vs)
              for s, vs in zip(structure_array, voxelspacing)
          ]
      except TypeError:
          structure_array = [
              structure_array / float(vs) for vs in voxelspacing
          ]
  
      return structure_array
  
imports: import numpy
  from scipy.ndimage import gaussian_filter, median_filter
  from scipy.ndimage import gaussian_gradient_magnitude
  from scipy.interpolate.interpolate import interp1d
  from scipy.ndimage import distance_transform_edt
  from scipy.ndimage._ni_support import _get_output
  from .utilities import join
  from ..core import ArgumentError
  from ..filter import sum_filter
label_desc: Use image node_id 22 for calling a global function with example usage: _create_structure_array(structure_array, voxelspacing) and returns: structure_array