def get_largest_fragment(fragments):
    """Return the largest connected component in a list of components.

    Parameters
    ----------
    fragments : list
        A list of strongly connected instances of NetworkX DiGraph each of
        which represents a component in the graph.

    Returns
    -------
    fragment : NetworkX DiGraph
        A strongly connected instance of NetworkX DiGraph that represents the
        largest component in the graph.
    """
    fragments.sort(key=lambda f: len(f.nodes()), reverse=True)
    return fragments[0]
