input: Write a function that ports a given Java code snippet to Python 3. The function should properly translate the Java methods and classes to their equivalent Python functions and classes. The function should take a string representation of the Java code as input and return a string representation of the corresponding Python code.
  
  def port_java_to_python(java_code):
      # Translation logic here
      pass
  
  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"
  assert port_java_to_python("public class Bar { public int bar( int a, int b ) { return a * b; } }") == "def bar(a, b):\n return a * b"
  assert port_java_to_python("public class Baz { public int baz( int a ) { return a - 1; } }") == "def baz(a):\n return a - 1"
  assert port_java_to_python("public class Qux { public int qux( int a, int b, int c ) { return (a + b) * c; } }") == "def qux(a, b, c):\n return (a + b) * c"
  assert port_java_to_python("") == ""
output: def port_java_to_python(java_code):
      if not java_code:
          return ""
      java_code = java_code.replace("public class ", "").replace("{", "").replace("}", "").strip()
      method_name = java_code.split()[1]
      params = java_code.split("(")[1].split(")")[0].split(", ")
      params = [param.split(" ")[1] for param in params]
      body = java_code.split("{")[1].split("}")[0].strip()
      return f"def {method_name}({', '.join(params)}):\n return {body}"