input: 
  from typing import List
  
  
  def port_java_to_python(java_code: str) -> str:
      """ Ports a given Java code snippet to Python 3. The input will be a valid Java
      code snippet with a class containing a method. The output will be the equivalent
      Python 3 function.
      >>> 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 String bar(String s) { return s + ' World'; } }")
      "def bar(s): return s + ' World'"
      """
  
output:     import re
  
      # Remove the class definition and keep only the method
      method_pattern = re.compile(r'public\s+\w+\s+(\w+)\s*\((.*?)\)\s*\{([^}]+)\}', re.DOTALL)
      match = method_pattern.search(java_code)
      
      if match:
          method_name = match.group(1)
          params = match.group(2).split(',')
          body = match.group(3).strip()
          
          # Convert parameters to Python format
          param_list = []
          for param in params:
              param = param.strip().split()
              if len(param) == 2:
                  param_list.append(param[1])
          
          # Convert the method body to Python
          body = body.replace('return', 'return ')
          body = body.replace(';', '')
          
          # Construct the Python function
          python_function = f"def {method_name}({', '.join(param_list)}): {body}"
          return python_function