def to_undirected(self, reciprocal=False):
        H=MultiGraph()
        H.name=self.name
        H.add_nodes_from(self)
        if reciprocal is True:
            H.add_edges_from( (u,v,key,deepcopy(data))
                              for u,nbrs in self.adjacency_iter()
                              for v,keydict in nbrs.items()
                              for key,data in keydict.items()
                              if self.has_edge(v,u,key))
        else:
            H.add_edges_from( (u,v,key,deepcopy(data))
                              for u,nbrs in self.adjacency_iter()
                              for v,keydict in nbrs.items()
                              for key,data in keydict.items())
        H.graph=deepcopy(self.graph)
        H.node=deepcopy(self.node)
        return H
Return true if device is on.
dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py/TimingMultiDiGraph.to_undirected--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/common.py/MockToggleDevice.is_on