def is_correctly_generated(graph: DiGraph, min_args, max_args) -> bool:
    """
    Check if a graph is correctly generated
    """
    # no empty graphs
    if graph.number_of_nodes() == 0 or graph.number_of_edges() == 0:
        return False

    # no incorrectly generated graphs
    if not min_args <= len(graph.nodes) <= max_args:
        return False

    # no graphs with isolated subgraphs
    if nx.number_connected_components(graph.to_undirected()) > 1:
        return False

    return True