def make_bounds(model_metabolite, minTotal=False):
    """
    Create reaction bounds.
      if minTotal == True then extra bound is added to acomodate for the pseudoreaction
    """
    basis = model_metabolite[3]
    p_basis = model_metabolite[6][0]
    deviation = model_metabolite[4]
    bounds = []
    for i in range(len(basis)):
        base = basis[i]
        dev = deviation[i]
        print('\n\ni', i)
        print('len(model_metabolite)', len(model_metabolite))
        print('len(model_metabolite)', len(model_metabolite[7]))
        lb = model_metabolite[7][i]
        ub = model_metabolite[8][i]
        if base == '' and (dev == '' or not dev.isnumeric()) or base == 'X':
            if lb != '' and ub != '':
                bounds.append((float(lb), float(ub)))
            elif model_metabolite[5][i] != 'R':
                b = 0, p_basis * 15
                bounds.append(b)
            elif model_metabolite[5][i] == 'BR':
                b = -p_basis * 15, p_basis * 15
                bounds.append(b)
            else:
                ubb = p_basis * 5
                b = 0, ubb
                bounds.append(b)
        elif base != '' and dev == '':
            assert float(base), 'Error: basis entry might not be a numeral'
            base = float(base)
            b = base, base
            bounds.append(b)
        elif base != '' and dev != '':
            assert float(base), 'Error: basis entry might not be a numeral'
            base = float(base)
            dev = float(dev)
            assert float(dev), 'Error: deviation entry might not be a numeral'
            b = base - dev, base + dev
            bounds.append(b)
    if minTotal is True:
        bounds.append((0, 5000))
    return bounds
