original_docstring:  Returns and array with the way relations the route could possible divert to by finding
          the alternative way divertions on the nodes in the vicinity of the current location.
      
docstring: Returns and array with the way relations the route could possible divert to by finding
  the alternative way divertions on the nodes in the vicinity of the current location.
docstring_tokens: Returns and array with the way relations the route could possible divert to by finding the alternative way divertions on the nodes in the vicinity of the current location .
code: def possible_divertions(self, ahead_idx, distance_to_node_ahead):
      """ Returns and array with the way relations the route could possible divert to by finding
          the alternative way divertions on the nodes in the vicinity of the current location.
      """
      if len(self._nodes_data) == 0 or ahead_idx is None:
        return []
  
      dist_route = self.get(NodeDataIdx.dist_route)
      rel_dist = dist_route - dist_route[ahead_idx] + distance_to_node_ahead
      valid_idxs = np.nonzero(np.logical_and(rel_dist >= _DIVERTION_SEARCH_RANGE[0],
                              rel_dist <= _DIVERTION_SEARCH_RANGE[1]))[0]
      valid_divertions = [self._divertions[i] for i in valid_idxs]
  
      return [wr for wrs in valid_divertions for wr in wrs]
code_tokens: def possible_divertions ( self , ahead_idx , distance_to_node_ahead ) : if len ( self . _nodes_data ) == 0 or ahead_idx is None : return [ ] dist_route = self . get ( NodeDataIdx . dist_route ) rel_dist = dist_route - dist_route [ ahead_idx ] + distance_to_node_ahead valid_idxs = np . nonzero ( np . logical_and ( rel_dist >= _DIVERTION_SEARCH_RANGE [ 0 ] , rel_dist <= _DIVERTION_SEARCH_RANGE [ 1 ] ) ) [ 0 ] valid_divertions = [ self . _divertions [ i ] for i in valid_idxs ] return [ wr for wrs in valid_divertions for wr in wrs ]
short_docstring: Returns and array with the way relations the route could possible divert to by finding
  the alternative way divertions on the nodes in the vicinity of the current location.
short_docstring_tokens: Returns and array with the way relations the route could possible divert to by finding the alternative way divertions on the nodes in the vicinity of the current location .
comment: """ Returns and array with the way relations the route could possible divert to by finding
          the alternative way divertions on the nodes in the vicinity of the current location.
      """