input: Write a function to port a Java code snippet to Python 3. Return the Python 3 equivalent code as a string.
  
  
  def port_java_to_python(java_code):
      # Your code here
      return python_code
  
  assert port_java_to_python("public class Foo { public int foo( int a, int b ) { return a + b; } }") == "def foo(a, b):\n return a + b"
  
output: def port_java_to_python(java_code):
      method_start = java_code.find("public int")
      method_end = java_code.find("}", method_start)
      method_body = java_code[method_start:method_end]
      method_body = method_body.replace("public int", "def").replace("return", "return ").replace(";", "")
      method_body = method_body.replace("{", ":\n").replace("}", "")
      return method_body.strip()