def graphStats(G, stats = ('nodes', 'edges', 'isolates', 'loops', 'density', 'transitivity'), makeString = True, sentenceString = False):
    """Returns a string or list containing statistics about the graph _G_.

    **graphStats()** gives 6 different statistics: number of nodes, number of edges, number of isolates, number of loops, density and transitivity. The ones wanted can be given to _stats_. By default a string giving each stat on a different line it can also produce a sentence containing all the requested statistics or the raw values can be accessed instead by setting _makeString_ to `False`.

    # Parameters

    _G_ : `networkx Graph`

    > The graph for the statistics to be determined of

    _stats_ : `optional [list or tuple [str]]`

    > Default `('nodes', 'edges', 'isolates', 'loops', 'density', 'transitivity')`, a list or tuple containing any number or combination of the strings:

    > `"nodes"`, `"edges"`, `"isolates"`, `"loops"`, `"density"` and `"transitivity"``

    > At least one occurrence of the corresponding string causes the statistics to be provided in the string output. For the non-string (tuple) output the returned tuple has the same length as the input and each output is at the same index as the string that requested it, e.g.

    > `_stats_ = ("edges", "loops", "edges")`

    > The return is a tuple with 2 elements the first and last of which are the number of edges and the second is the number of loops

    _makeString_ : `optional [bool]`

    > Default `True`, if `True` a string is returned if `False` a tuple

    _sentenceString_ : `optional [bool]`

    >Default `False` : if `True` the returned string is a sentce, otherwise each value has a seperate line.

    # Returns

    `str or tuple [float and int]`

    > The type is determined by _makeString_ and the layout by _stats_
     """

    for sts in stats:
        if sts not in ['nodes', 'edges', 'isolates', 'loops', 'density', 'transitivity']:
            raise RuntimeError('"{}" is not a valid stat.'.format(sts))
    if makeString:
        stsData = []
    else:
        stsData = {}
    if 'nodes' in stats:
        if makeString:
            if sentenceString:
                stsData.append("{:G} nodes".format(len(G.nodes())))
            else:
                stsData.append("Nodes: {:G}".format(len(G.nodes())))
        else:
            stsData['nodes'] = len(G.nodes())
    if 'edges' in stats:
        if makeString:
            if sentenceString:
                stsData.append("{:G} edges".format(len(G.edges())))
            else:
                stsData.append("Edges: {:G}".format(len(G.edges())))
        else:
            stsData['edges'] = len(G.edges())
    if 'isolates' in stats:
        if makeString:
            if sentenceString:
                stsData.append("{:G} isolates".format(len(list(nx.isolates(G)))))
            else:
                stsData.append("Isolates: {:G}".format(len(list(nx.isolates(G)))))
        else:
            stsData['isolates'] = len(list(nx.isolates(G)))
    if 'loops' in stats:
        if makeString:
            if sentenceString:
                stsData.append("{:G} self loops".format(len(list(G.selfloop_edges()))))
            else:
                stsData.append("Self loops: {:G}".format(len(list(G.selfloop_edges()))))
        else:
            stsData['loops'] = len(list(G.selfloop_edges()))
    if 'density' in stats:
        if makeString:
            if sentenceString:
                stsData.append("a density of {:G}".format(nx.density(G)))
            else:
                stsData.append("Density: {:G}".format(nx.density(G)))
        else:
            stsData['density'] = nx.density(G)
    if 'transitivity' in stats:
        if makeString:
            if sentenceString:
                stsData.append("a transitivity of {:G}".format(nx.transitivity(G)))
            else:
                stsData.append("Transitivity: {:G}".format(nx.transitivity(G)))
        else:
            stsData['transitivity'] = nx.transitivity(G)
    if makeString:
        if sentenceString:
            retString = "The graph has "
            if len(stsData) < 1:
                return retString
            elif len(stsData) == 1:
                return retString + stsData[0]
            else:
                return retString + ', '.join(stsData[:-1]) + ' and ' + stsData[-1]
        else:
            return '\n'.join(stsData)
    else:
        retLst = []
        for sts in stats:
            retLst.append(stsData[sts])
        return tuple(retLst)