code: def template_sphere(radius, dimensions):
      r"""
      Returns a spherical binary structure of a of the supplied radius that can be used as
      template input to the generalized hough transform.
  
      Parameters
      ----------
      radius : integer
          The circles radius in voxels.
      dimensions : integer
          The dimensionality of the circle
  
      Returns
      -------
      template_sphere : ndarray
          A boolean array containing a sphere.
      """
      if int(dimensions) != dimensions:
          raise TypeError(
              "The supplied dimension parameter must be of type integer."
          )
      dimensions = int(dimensions)
  
      return template_ellipsoid(dimensions * [radius * 2])
  
imports: import math
  import numpy
  from .utilities import pad
label_desc: Use image node_id 3 for calling a global function with example usage: template_sphere(radius, dimensions) and returns: template_ellipsoid