input: def port_java_to_python(java_code: str) -> str:
      """
      Transfer a given Java code snippet to Python 3. 
      Example:
      For 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:     java_code = java_code.replace("public class", "class").replace("public", "").replace("int", "").replace(";", "").replace("{", "").replace("}", "")
      java_code = java_code.replace("return", "return ").strip()
      java_code = java_code.replace("(", "( ").replace(" )", ")")
      java_code = java_code.replace("  ", " ")
      java_code = java_code.replace("def", "def ")
      java_code = java_code.replace("class", "class ")
      return java_code