(function from pyomo.util.slices)
pyomo.util.slices
Get the call stack necessary to locate a Component
The call stack is a list of tuple`s where the first entry is a code for `__getattr__ or __getitem__, using the same convention as IndexedComponent_slice. The second entry is the argument of the corresponding function. Following this sequence of calls from context (or the top-level model if context is None) will produce comp.
The component to locate
The block within which to locate the component. If None, the top-level model will be used.
Note that the calls should be applied in reverse order. This is the opposite direction as in IndexedComponent_slice.