def number_of_edges(self, u=None, v=None):
        if u is None: return int(self.size())
        if v in self.adj[u]:
            return 1
        else:
            return 0
Handles a simplified validator that only returns whether or not the
dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py/TimingGraph.number_of_edges--crossover with--dataset/ETHPy150Open enthought/traits/traits/trait_handlers.py/TraitType._is_valid_for