navigate_network_dfs offers two usage patterns. In the simple case,
you can provide an hy in which case preprocessing is performed automatically,
or you can do the preprocessing ahead of time and provide index ids. The latter
is more complicated but can be much faster in certain circumstances.
hy object:
If the function will only be called one or a few times, it can be called
with x containing (at a minimum) id and toid. For "upmain" and "downmain"
support, x also requires attributes for determination of the primary upstream
and downstream connection across every junction.
In this pattern, the hy object will be passed to make_index_ids
called for every call to navigate_network_dfs and the resulting index ids
will be used for network navigation.
Index ids:
If the function will be called repeatedly or index_ids are available for
other reasons, the index_id list as created by make_index_ids ("to"
mode for downstream or "from" mode for upstream). For "upmain"
and "downmain" support, the main element must be included.