def density_net(G0):
    """
    Function that receives a directed network and computes the density of it
    """
    m0 = G0.size()  # Number of links in the network G0
    n0 = G0.number_of_nodes()  # Number of nodes in the network G0
    return m0 / (n0 * (n0 - 1.0))