input: from typing import List
  
  
  def sum_pairs(numbers: List[int]) -> List[int]:
      """ Given a list of integers, this function returns the sum of all pairs of consecutive elements.
      If the input list has fewer than two elements, it returns the list itself.
      >>> sum_pairs([1, 2, 3, 4])
      [3, 5, 7]
      >>> sum_pairs([5, 10])
      [15]
      >>> sum_pairs([7])
      [7]
      """
output:     if len(numbers) < 2:
          return numbers
      result = []
      for i in range(len(numbers) - 1):
          result.append(numbers[i] + numbers[i + 1])
      return result