See #235 (comment)
We added extend_dependent_var_ids and extend_associated_var_ids. The dependent version of the API is similar (not identical) to the existing nonzeroes function. The differences are
nonzeroes has more information on the rows involved as well as the variables
extend_dependent_var_ids can be passed a collection like a set which means no order or duplicates
A possible refactor is to have an internal helper function whose implementation satisfies the stricter requirements (nonzeroes) and extend_dependent_var_ids collapses the results based on the collection passed as input.