<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def router_elements(self):
 """A |Elements| collection of all "routing" basins. (Only river basins with a upstream basin are assumed to route something to the downstream basin.) The following elements are properly connected to the required inlet and outlet nodes already: Element("stream_1123", inlets="node_1123", outlets="node_1125") Element("stream_1125", inlets="node_1125", outlets="node_1129") Element("stream_11269", inlets="node_11269", outlets="node_1129") Element("stream_1129", inlets="node_1129", outlets="node_113") Element("stream_113", inlets="node_113", outlets="node_outlet") It is both possible to change the prefix names of the elements and nodes, as long as it results in a valid variable name (e.g. does not start with a number):
 Elements("c_1123", "c_1125", "c_11269", "c_1129", "c_113") """

        elements = devicetools.Elements()
        for router in self._router_numbers:
            element = self._get_routername(router)
            inlet = self._get_nodename(router)
            try:
                outlet = self._get_nodename(self._up2down[router])
            except TypeError:
                outlet = self.last_node
            elements += devicetools.Element(
                element, inlets=inlet, outlets=outlet)
        return elements