input: Write a python function to optimize an expression using linear algebra.
  assert np.allclose(optimize_expression("3x + 2y + 4z = 5"), [1.25, 0.0, -0.625])
  assert np.allclose(optimize_expression("2x + 3y + 5z = 10"), [5.0, 0.0, -1.0])
  assert np.allclose(optimize_expression("1x + 1y + 1z = 3"), [1.5, 0.0, -0.5])
output: import numpy as np
  
  def optimize_expression(expression):
      terms, result = expression.split('=')
      coefficients = []
      terms = terms.split('+')
      for term in terms:
          coefficient, variable = term.split()
          coefficients.append(float(coefficient.strip()))
      result = float(result.strip())
      A = np.array([coefficients])
      b = np.array([result])
      x = np.linalg.lstsq(A, b, rcond=None)[0]
      return x