<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_common_elements(list1, list2):
 """find the common elements in two lists. used to support auto align might be faster with sets Parameters list1 : list a list of objects list2 : list a list of objects Returns ------- list : list list of common objects shared by list1 and list2 """

    #result = []
    #for item in list1:
    #    if item in list2:
    #        result.append(item)
    #Return list(set(list1).intersection(set(list2)))
    set2 = set(list2)
    result = [item for item in list1 if item in set2]
    return result