input: from typing import List
  
  def nested_parenthesis_depth(paren_string: str) -> List[int]:
      """ Given a string with multiple groups of nested parentheses separated by spaces,
      return the maximum depth of parentheses nesting for each group.
      For example, (()()) has a maximum nesting depth of two while ((())) has a maximum depth of three.
  
      >>> nested_parenthesis_depth('(()()) ((())) () ((())()())')
      [2, 3, 1, 3]
      """
output:     groups = paren_string.split()
      depths = []
  
      for group in groups:
          max_depth = 0
          current_depth = 0
  
          for char in group:
              if char == '(':
                  current_depth += 1
                  if current_depth > max_depth:
                      max_depth = current_depth
              elif char == ')':
                  current_depth -= 1
  
          depths.append(max_depth)
  
      return depths