code: def random_layout(G, center=None, dim=2, seed=None):
      """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 or list of nodes
          A position will be assigned to every node in G.
  
      center : array-like or None
          Coordinate pair around which to center the layout.
  
      dim : int
          Dimension of layout.
  
      seed : int, RandomState instance or None  optional (default=None)
          Set the random state for deterministic node layouts.
          If int, `seed` is the seed used by the random number generator,
          if numpy.random.RandomState instance, `seed` is the random
          number generator,
          if None, the random number generator is the RandomState instance used
          by numpy.random.
  
      Returns
      -------
      pos : dict
          A dictionary of positions keyed by node
  
      Examples
      --------
      >>> G = nx.lollipop_graph(4, 3)
      >>> pos = nx.random_layout(G)
  
      """
      import numpy as np
  
      G, center = _process_params(G, center, dim)
      pos = seed.rand(len(G), dim) + center
      pos = pos.astype(np.float32)
      pos = dict(zip(G, pos))
  
      return pos
  
imports: import networkx
  from networkx.utils import np_random_state
label_desc: Use image node_id 2 for calling a global function with example usage: random_layout(G, center, dim, seed) and returns: pos