def random_layout(G,dim=2):
    """Position nodes uniformly at random in the unit square.

    For every node, a position is generated by choosing each of dim
    coordinates uniformly at random on the interval [0.0, 1.0).

    NumPy (http://scipy.org) is required for this function.

    Parameters
    ----------
    G : NetworkX graph
       A position will be assigned to every node in G.

    dim : int
       Dimension of layout.

    Returns
    -------
    dict :
       A dictionary of positions keyed by node

    Examples
    --------
    >>> G = nx.lollipop_graph(4, 3)
    >>> pos = nx.random_layout(G)

    """
    try:
        import numpy as np
    except __HOLE__:
        raise ImportError("random_layout() requires numpy: http://scipy.org/ ")
    n=len(G)
    pos=np.asarray(np.random.random((n,dim)),dtype=np.float32)
    return dict(zip(G,pos))
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/drawing/layout.py/random_layout