input: from typing import List
  
  
  def expand_list(list: List[int]) -> List[int]:
      """ Expands the given list by doubling its size for each item in the list.
      However, it should be noted that modifying the list while iterating over it
      can lead to unexpected behavior. Instead, a copy of the list should be made
      before the iteration to avoid this issue.
      >>> expand_list([1, 2, 3])
      [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
      >>> expand_list([4, 5])
      [4, 5, 4, 5, 4, 5, 4, 5]
      """
      list_copy = list[:]   # make a copy of the list
      for item in list_copy:
          list *= 2
output:     return list