code: def is_monotonic(neurite, tol):
      '''Check if neurite tree is monotonic
  
      If each child has smaller or equal diameters from its parent
  
      Args:
          neurite(Neurite): neurite to operate on
          tol(float): tolerance
  
      Returns:
          True if neurite monotonic
      '''
  
      for node in neurite.iter_sections():
          # check that points in section satisfy monotonicity
          sec = node.points
          for point_id in range(len(sec) - 1):
              if sec[point_id + 1][COLS.R] > sec[point_id][COLS.R] + tol:
                  return False
          # Check that section boundary points satisfy monotonicity
          if(node.parent is not None and
             sec[0][COLS.R] > node.parent.points[-1][COLS.R] + tol):
              return False
  
      return Truf is_monotonic(neurite, tol):
      '''Check if neurite tree is monotonic
  
      If each child has smaller or equal diameters from its parent
  
      Args:
          neurite(Neurite): neurite to operate on
          tol(float): tolerance
  
      Returns:
          True if neurite monotonic
      '''
  
      for node in neurite.iter_sections():
          # check that points in section satisfy monotonicity
          sec = node.points
          for point_id in range(len(sec) - 1):
              if sec[point_id + 1][COLS.R] > sec[point_id][COLS.R] + tol:
                  return False
          # Check that section boundary points satisfy monotonicity
          if(node.parent is not None and
             sec[0][COLS.R] > node.parent.points[-1][COLS.R] + tol):
              return False
  
      return True
docs: Check if neurite tree is monotonic
  
      If each child has smaller or equal diameters from its parent
  
      Args:
          neurite(Neurite): neurite to operate on
          tol(float): tolerance
  
      Returns:
          True if neurite monotonic