input: Write a python function to perform basic arithmetic operations (add, subtract, multiply) based on the given operation parameter.
  assert calculate(3, 2, 'add') == 5
  assert calculate(3, 2, 'subtract') == 1
  assert calculate(3, 2, 'multiply') == 6
output: def calculate(a, b, operation):
      if operation == 'add':
          return a + b
      elif operation == 'subtract':
          return a - b
      elif operation == 'multiply':
          return a * b
      else:
          raise ValueError("Invalid operation")