original_docstring: Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for
         speed limit sections due to curvatures in the road.
      
docstring: Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for
  speed limit sections due to curvatures in the road.
docstring_tokens: Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for speed limit sections due to curvatures in the road .
code: def curvatures_speed_limit_sections_ahead(self, ahead_idx, distance_to_node_ahead):
      """Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for
         speed limit sections due to curvatures in the road.
      """
      if len(self._curvature_speed_sections_data) == 0 or ahead_idx is None:
        return []
  
      # Find the current distance traveled so far on the route.
      dist_curr = self.get(NodeDataIdx.dist_route)[ahead_idx] - distance_to_node_ahead
  
      # Filter the sections to get only those where the stop distance is ahead of current.
      sec_filter = self._curvature_speed_sections_data[:, 1] > dist_curr
      data = self._curvature_speed_sections_data[sec_filter]
  
      # Offset distances to current distance.
      data[:, [0, 1]] -= dist_curr
  
      # Create speed limits sections
      limits_ahead = [TurnSpeedLimitSection(max(0., d[0]), d[1], d[2], d[3]) for d in data]
  
      return limits_ahead
code_tokens: def curvatures_speed_limit_sections_ahead ( self , ahead_idx , distance_to_node_ahead ) : if len ( self . _curvature_speed_sections_data ) == 0 or ahead_idx is None : return [ ] dist_curr = self . get ( NodeDataIdx . dist_route ) [ ahead_idx ] - distance_to_node_ahead sec_filter = self . _curvature_speed_sections_data [ : , 1 ] > dist_curr data = self . _curvature_speed_sections_data [ sec_filter ] data [ : , [ 0 , 1 ] ] -= dist_curr limits_ahead = [ TurnSpeedLimitSection ( max ( 0. , d [ 0 ] ) , d [ 1 ] , d [ 2 ] , d [ 3 ] ) for d in data ] return limits_ahead
short_docstring: Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for
  speed limit sections due to curvatures in the road.
short_docstring_tokens: Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for speed limit sections due to curvatures in the road .
comment: """Returns and array of TurnSpeedLimitSection objects for the actual route ahead of current location for
         speed limit sections due to curvatures in the road.
      """$SEP$# Find the current distance traveled so far on the route.$SEP$# Filter the sections to get only those where the stop distance is ahead of current.$SEP$# Offset distances to current distance.$SEP$# Create speed limits sections