input: Write a function to convert a Java code snippet to Python 3. The function should take the Java code snippet as input and return the equivalent Python code. Implement the function and provide assert statements to verify its correctness.
  
  assert convert_java_to_python("public class Foo {\n  public int foo( int a, int b ) {\n    return a + b;\n  }\n}") == "def foo(a, b):\n return a + b"
output: def convert_java_to_python(java_code):
      lines = java_code.strip().split('\n')
      method_line = lines[1].strip()
      method_name = method_line.split()[2].split('(')[0]
      params = method_line.split('(')[1].split(')')[0].split(', ')
      param_names = [param.split(' ')[1] for param in params]
      return_line = lines[2].strip()
      return_value = return_line.split('return ')[1].strip()
      python_code = f"def {method_name}({', '.join(param_names)}):\n return {return_value}"
      return python_code