<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def net_connections(self, include_virtual_nodes=False):
 """ Returns a representation of the current block useful for creating a graph. :param include_virtual_nodes: if enabled, the wire itself will be used to signal an external source or sink (such as the source for an Input net). If disabled, these nodes will be excluded from the adjacency dictionaries :return wire_src_dict, wire_sink_dict Returns two dictionaries: one that map WireVectors to the logic nets that creates their signal and one that maps WireVectors to a list of logic nets that use the signal These dictionaries make the creation of a graph much easier, as well as facilitate other places in which one would need wire source and wire sink information Look at input_output.net_graph for one such graph that uses the information from this function """

        src_list = {}
        dst_list = {}

        def add_wire_src(edge, node):
            if edge in src_list:
                raise PyrtlError('Wire "{}" has multiple drivers (check for multiple assignments '
                                 'with "<<=" or accidental mixing of "|=" and "<<=")'.format(edge))
            src_list[edge] = node

        def add_wire_dst(edge, node):
            if edge in dst_list:
                # if node in dst_list[edge]:
                #     raise PyrtlError("The net already exists in the graph")
                dst_list[edge].append(node)
            else:
                dst_list[edge] = [node]

        if include_virtual_nodes:
            from .wire import Input, Output, Const
            for wire in self.wirevector_subset((Input, Const)):
                add_wire_src(wire, wire)

            for wire in self.wirevector_subset(Output):
                add_wire_dst(wire, wire)

        for net in self.logic:
            for arg in set(net.args):  # prevents unexpected duplicates when doing b <<= a & a
                add_wire_dst(arg, net)
            for dest in net.dests:
                add_wire_src(dest, net)
        return src_list, dst_list