input: Write a function to port the given Java code snippet to Python 3. The function should take two integer inputs and return their sum.
  assert foo(3, 4) == 7
  assert foo(0, 0) == 0
  assert foo(-1, 1) == 0
  assert foo(5, -2) == 3
  assert foo(-3, -4) == -7
output: def foo(a, b):
      return a + b