<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def uniform(graph, vartype, low=0.0, high=1.0, cls=BinaryQuadraticModel, seed=None):
 """Generate a bqm with random biases and offset. Biases and offset are drawn from a uniform distribution range (low, high). Args: graph (int/tuple[nodes, edges]/:obj:`~networkx.Graph`):
 The graph to build the bqm loops on. Either an integer n, interpreted as a complete graph of size n, or a nodes/edges pair, or a NetworkX graph. vartype (:class:`.Vartype`/str/set):
 Variable type for the binary quadratic model. Accepted input values: * :class:`.Vartype.SPIN`, ``'SPIN'``, ``{-1, 1}`` * :class:`.Vartype.BINARY`, ``'BINARY'``, ``{0, 1}`` low (float, optional, default=0.0):
 The low end of the range for the random biases. high (float, optional, default=1.0):
 The high end of the range for the random biases. cls (:class:`.BinaryQuadraticModel`):
 Binary quadratic model class to build from. seed (int, optional, default=None):
 Random seed. Returns: :obj:`.BinaryQuadraticModel` """

    if seed is None:
        seed = numpy.random.randint(2**32, dtype=np.uint32)
    r = numpy.random.RandomState(seed)

    variables, edges = graph

    index = {v: idx for idx, v in enumerate(variables)}

    if edges:
        irow, icol = zip(*((index[u], index[v]) for u, v in edges))
    else:
        irow = icol = tuple()

    ldata = r.uniform(low, high, size=len(variables))
    qdata = r.uniform(low, high, size=len(irow))
    offset = r.uniform(low, high)

    return cls.from_numpy_vectors(ldata, (irow, icol, qdata), offset, vartype,
                                  variable_order=variables)