def is_cyclic_util(node, visited, recStack, graph):
    """Test a sub-branch for cyclic behaviour

    A directed graph is cyclic if you can follow the graph along its
    direction and return to a node you have already visited. This behavior
    will lead to circular dependencies (i.e. a unsolvable dependency tree)
    if the graph describes dependencies.
    For more read: http://mathworld.wolfram.com/CyclicGraph.html

    Note:
        This function is designed to analyse cyclic behavior from a specific
        node. See the `is_cyclic` function to analyse an entire graph.

    Args:
        node (str): Name of current node
        visited (dict): Dict of visited nodes
        recStack (dict): Dict of nodes in the recursive search
        graph (NX Graph): The full graph object

    Returns:
        is_cyclic (bool): Is the sub-graph cyclic
    """
    # Mark current node as visited and
    # adds to recursion stack
    visited[node] = True
    recStack[node] = True

    # Recur for all neighbours
    # if any neighbour is visited and in
    # recStack then graph is cyclic
    for neighbour in graph[node]:
        if visited[neighbour] is False:
            if is_cyclic_util(neighbour, visited, recStack, graph) is True:
                return True
        elif recStack[neighbour] is True:
            return True

    # The node needs to be poped from
    # recursion stack before function ends
    recStack[node] = False
    return False