input: from typing import List
  
  
  def ported_java_to_python(java_code: str) -> str:
      """ Port a Java code snippet to Python 3. The input is a string containing
      the Java code and the output is a string containing the equivalent Python 3 code.
      
      >>> ported_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'
      """
output:     lines = java_code.strip().split('\n')
      python_code = []
      
      for line in lines:
          line = line.strip()
          if line.startswith('public class'):
              continue
          if line.startswith('public'):
              line = line.replace('public ', '')
          if line.startswith('int'):
              line = line.replace('int ', '')
          if line.startswith('void'):
              line = line.replace('void ', '')
          if 'return' in line:
              line = line.replace(';', '')
          if '{' in line:
              line = line.replace('{', '')
          if '}' in line:
              continue
          if '(' in line and ')' in line:
              line = line.replace('(', '(').replace(')', ')')
          if ';' in line:
              line = line.replace(';', '')
          python_code.append(line)
      
      return '\n'.join(python_code)