parameters: (list1, list2)
return_statement: return [x for x in list1 if x in list2]
docstring: Given two lists, get a new list consisting of the elements only contained
      in *both of the input lists*, while preserving the ordering.
docstring_summary: Given two lists, get a new list consisting of the elements only contained
      in *both of the input lists*, while preserving the ordering.
docstring_tokens: Given two lists get a new list consisting of the elements only contained in * both of the input lists * while preserving the ordering .
function: def intersect(list1, list2):
      """
      Given two lists, get a new list consisting of the elements only contained
      in *both of the input lists*, while preserving the ordering.
      """
      return [x for x in list1 if x in list2]
function_tokens: def intersect ( list1 , list2 ) : return [ x for x in list1 if x in list2 ]