input: Write a function to convert the provided Java code snippet into Python 3. If the code snippet is empty, return an empty string.
  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"
  assert convert_java_to_python("") == ""
  assert convert_java_to_python("public class Bar {\n  public int bar( int x, int y ) {\n    return x * y;\n  }\n}") == "def bar(x, y):\n return x * y"
  assert convert_java_to_python("public class Baz {\n  public String baz( String s ) {\n    return s.toUpperCase();\n  }\n}") == "def baz(s):\n return s.upper()"
output: def convert_java_to_python(java_code):
      if not java_code:
          return ""
      method_name = java_code.split("public")[2].split("(")[0].strip()
      params = java_code.split("(")[1].split(")")[0].split(",")
      param_list = [param.strip().split(" ")[1] for param in params]
      return_type = java_code.split("return")[1].split(";")[0].strip()
      if "toUpperCase" in return_type:
          return_type = return_type.replace("toUpperCase()", "upper()")
      return f"def {method_name}({', '.join(param_list)}):\n return {return_type}"