code: def is_cyclic(graph):
      
      path = set()
  
      def visit(vertex):
          path.add(vertex)
          for neighbour in graph.get(vertex, ()):
              if neighbour in path or visit(neighbour):
                  return True
          path.remove(vertex)
          return False
  
      return any(visit(v) for v in graph)
docs: Return True if the directed graph g has a cycle. The directed graph
      should be represented as a dictionary mapping of edges for each node.