input: Write a function to solve a linear programming problem using the Simplex method in Python. The function should take the decision variables, objective function, and constraints as input and return the optimal solution. If the problem cannot be solved due to infeasibility or unboundedness, the function should return an appropriate message.
  assert simplex_method([x, y], "Maximize 3x + 2y", ["x + y <= 10", "2x + y <= 15", "x >= 0", "y >= 0"])==[5, 0, 15]
  assert simplex_method([x, y, z], "Minimize 2x + 4y + 3z", ["x + y + z >= 5", "2x + y <= 10", "x >= 0", "y >= 0", "z >= 0"])==[0, 0, 5, 0, 5]
  assert simplex_method([x, y], "Maximize x + y", ["x + y <= 1", "x >= 0", "y >= 0"])==[1, 0]
  assert simplex_method([x, y], "Maximize 2x + y", ["x + y >= 10", "x <= 4", "y <= 6"])=="Problem is infeasible"
  assert simplex_method([x, y], "Maximize 2x - y", ["y <= 4", "2x + y <= 6", "x >= 0", "y >= 0"])==[3, 0, 6]
output: 
  def simplex_method(variables, objective, constraints):
      from scipy.optimize import linprog
      import re
  
      obj_coeffs = [float(coeff) for coeff in re.findall(r'-?\d+', objective)]
      if "Minimize" in objective:
          obj_coeffs = [-x for x in obj_coeffs]
  
      constraint_coeffs = []
      constraint_bounds = []
      for constraint in constraints:
          if "<=" in constraint:
              coeffs = [float(coeff) for coeff in re.findall(r'-?\d+', constraint.split("<=")[0])]
              bound = float(constraint.split("<=")[1])
              constraint_coeffs.append(coeffs)
              constraint_bounds.append(bound)
          elif ">=" in constraint:
              coeffs = [float(coeff) for coeff in re.findall(r'-?\d+', constraint.split(">=")[0])]
              bound = float(constraint.split(">=")[1])
              constraint_coeffs.append([-x for x in coeffs])
              constraint_bounds.append(-bound)
  
      result = linprog(c=obj_coeffs, A_ub=constraint_coeffs, b_ub=constraint_bounds, method='simplex')
  
      if result.success:
          solution = [round(x, 2) for x in result.x]
          solution.append(round(result.fun, 2))
          return solution
      elif result.status == 2:
          return "Problem is infeasible"
      elif result.status == 3:
          return "Problem is unbounded"
  