code: def max_angle_from_curvature(min_radius_curvature, step_size):
      """Get the maximum deviation angle from the minimum radius curvature.
  
      Parameters
      ----------
      min_radius_curvature: float
          Minimum radius of curvature in mm.
      step_size: float
          The tracking step size in mm.
  
      Returns
      -------
      max_angle: float
          The maximum deviation angle in radian,
          given the radius curvature and the step size.
  
      References
      ----------
      For more information:
      https://onlinelibrary.wiley.com/doi/full/10.1002/ima.22005
  
      """
      max_angle = 2.0 * np.arcsin(
          step_size / (2.0 * min_radius_curvature)
      )
      if np.isnan(max_angle) or max_angle > np.pi / 2 or max_angle <= 0:
          w_msg = (
              "The max_angle found is outside the interval [0 ; pi/2]."
          )
          w_msg += "max_angle will be set to the default value pi/2"
          warn(w_msg)
          max_angle = np.pi / 2.0
      return max_angle
  
imports: from collections import defaultdict, OrderedDict
  from functools import wraps
  from itertools import combinations, groupby
  from warnings import warn
  import numpy
  from nibabel.affines import apply_affine
  from scipy.spatial.distance import cdist
  from dipy.core.geometry import dist_to_corner
  from dipy.tracking import metrics
  from dipy.tracking.vox2track import _streamlines_in_mask
  from dipy.tracking._utils import _mapping_to_voxel, _to_voxel_coordinates
label_desc: Use image node_id 21 for calling a global function with example usage: max_angle_from_curvature(min_radius_curvature, step_size) and returns: max_angle