input: 
  def port_java_to_python(java_code: str) -> str:
      """Port a given Java code snippet to Python 3.
      >>> port_java_to_python("public class Foo { public int foo( int a, int b ) { return a + b; } }")
      "def foo(a, b): return a + b"
      >>> port_java_to_python("public class Bar { public int bar( int a, int b, int c ) { return a * b + c; } }")
      "def bar(a, b, c): return a * b + c"
      """
  
output:     import re
  
      # Remove class declaration and method signature
      java_code = re.sub(r'public class \w+ { public \w+ \w+\(.*\) {', '', java_code)
      java_code = re.sub(r'}', '', java_code)
  
      # Convert method signature to Python function definition
      method_name = re.search(r'public \w+ (\w+)\(', java_code).group(1)
      params = re.search(r'\((.*?)\)', java_code).group(1)
      params = params.replace('int ', '')
      params = params.replace(' ', '')
      params = params.split(',')
  
      # Convert method body to Python function body
      method_body = re.search(r'{ (.*) }', java_code, re.DOTALL).group(1)
      method_body = method_body.strip()
  
      # Construct Python function
      python_code = f"def {method_name}({', '.join(params)}): return {method_body}"
  
      return python_code