input: Write a function to optimize an equation by combining like terms and returning the simplified form of the equation. Given an equation as a string where terms are separated by '+' and each term is in the form of "<variable> <count>", the function should return a string representing the simplified equation.
  
  def optimize_equation(equation):
      variables = []
      for term in equation.split('+'):
          var, count = term.strip().split(' ')
          variables.append((var, int(count)))
  
      var_map = {}
      for var, count in variables:
          if var in var_map:
              var_map[var] += count
          else:
              var_map[var] = count
  
      new_equation = ""
      for var, count in var_map.items():
          new_equation += var + ' ' + str(count) + ' + '
      return new_equation[:-3]
  
  assert optimize_equation('x + x + y + y + y') == 'x 2 + y 3'
  assert optimize_equation('a + a + b + b + b + c') == 'a 2 + b 3 + c 1'
  assert optimize_equation('x + y + z') == 'x 1 + y 1 + z 1'
  assert optimize_equation('') == ''
  assert optimize_equation('x 0 + y 0') == 'x 0 + y 0'
output: def optimize_equation(equation):
      if not equation:
          return ''
      
      variables = []
      for term in equation.split('+'):
          var, count = term.strip().split(' ')
          variables.append((var, int(count)))
  
      var_map = {}
      for var, count in variables:
          if var in var_map:
              var_map[var] += count
          else:
              var_map[var] = count
  
      new_equation = ""
      for var, count in var_map.items():
          new_equation += var + ' ' + str(count) + ' + '
      return new_equation[:-3]