input: Write a python function to perform basic arithmetic operations based on a given operation string.
  assert perform_operation('add', 5, 3) == 8
  assert perform_operation('substract', 10, 4) == 6
  assert perform_operation('multiply', 7, 6) == 42
  assert perform_operation('divide', 9, 3) == 3.0
output: def perform_operation(operation, a, b):
      if operation == 'add':
          return a + b
      elif operation == 'substract':
          return a - b
      elif operation == 'multiply':
          return a * b
      elif operation == 'divide':
          return a / b
      else:
          raise ValueError("Invalid operation")