input: from typing import Callable
  
  def port_java_to_python(java_code: str) -> Callable:
      """Port a given Java code snippet to Python 3.
      The input is a string representing a Java method without the class definition.
      The output should be the equivalent Python function.
      >>> port_java_to_python("public int foo( int a, int b ) {\n  return a + b;\n}")
      def foo(a, b):
       return a + b
      """
output:     
      java_lines = java_code.strip().split('\n')
      java_method_signature = java_lines[0]
      java_method_body = '\n'.join(java_lines[1:])
  
      # Extract method name and parameters
      method_name = java_method_signature.split(' ')[2].split('(')[0]
      params_str = java_method_signature.split('(')[1].split(')')[0]
      params = [param.split(' ')[1] for param in params_str.split(', ') if param]
  
      # Convert method body
      python_method_body = java_method_body.replace('return', 'return ').replace(';', '')
  
      # Construct Python function
      python_function = f"def {method_name}({', '.join(params)}):\n    {python_method_body}"
  
      # Execute the function string to create the function
      exec(python_function, globals())
  
      return globals()[method_name]
  