code: def split_linear_constraints(A, l, u):
      
      ieq = []
      igt = []
      ilt = []
      ibx = []
      for i in range(len(l)):
          if abs(u[i] - l[i]) <= EPS:
              ieq.append(i)
          elif (u[i] > 1e10) and (l[i] > -1e10):
              igt.append(i)
          elif (l[i] <= -1e10) and (u[i] < 1e10):
              ilt.append(i)
          elif (abs(u[i] - l[i]) > EPS) and (u[i] < 1e10) and (l[i] > -1e10):
              ibx.append(i)
          else:
              raise ValueError
  
      Ae = A[ieq, :]
      Ai = sparse([A[ilt, :], -A[igt, :], A[ibx, :], -A[ibx, :]])
      be = u[ieq, :]
      bi = matrix([u[ilt], -l[igt], u[ibx], -l[ibx]])
  
      return Ae, be, Ai, bi
docs: Returns the linear equality and inequality constraints.