input: from typing import List, Tuple
  
  def port_java_to_python(java_code: List[str]) -> Tuple[str, str]:
      """Given a Java code snippet, ports it to Python 3 and returns the ported code as well as the function name.
      
      Example:
      >>> 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', 'foo')
      """
output:     function_name = ""
      python_code = []
      for line in java_code:
          line = line.strip()
          if line.startswith("public class"):
              function_name = line.split()[2].strip("{")
          elif line.startswith("public") and "(" in line:
              parts = line.split()
              function_name = parts[2].split("(")[0]
              args = parts[2].split("(")[1].split(")")[0].split(",")
              args = [arg.split()[-1] for arg in args]
              python_code.append(f"def {function_name}({', '.join(args)}):")
          elif line.startswith("return"):
              python_code.append(f" return {line.split()[1]}")
          elif line.startswith("}"):
              continue
          else:
              python_code.append(line)
      return "\n".join(python_code), function_name