def degree(self, vertex):
        """Return the number of edges for a given vertex.
        Only allows string/integer/tuple vertices."""
        try:
            return len(self.vertices[vertex]['edges'])
        except __HOLE__:
            return 0
dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/graphs/graphs.py/Graph.degree