input: Write a function to convert a given Java code snippet to Python 3. The function should take in the Java code as a string and return the equivalent Python code as a string. The function should handle basic Java classes and methods.
  assert port_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"
  assert port_java_to_python("public class Bar {\n  public int bar( int x ) {\n    return x * 2;\n  }\n}") == "def bar(x):\n return x * 2"
  assert port_java_to_python("public class Baz {\n  public int baz( int y ) {\n    return y / 2;\n  }\n}") == "def baz(y):\n return y // 2"
  assert port_java_to_python("") == ""
output: def port_java_to_python(java_code):
      if not java_code.strip():
          return ""
      java_code = java_code.replace("public class", "").replace("public int", "def").replace("int", "").replace(";", "")
      java_code = java_code.replace("{", ":\n").replace("}", "").replace("return", "return ")
      return java_code.strip()