def get_common_items(list1, list2):
    """
    Compares two lists and returns the common items in a new list. Used internally.

    Example
    -------
    >>> list1 = [1, 2, 3, 4]
    >>> list2 = [2, 3, 4, 5]
    >>> common = get_common_items(list1, list2)

    list1: list

    list2: list

    returns: list
    """
    common = [value for value in list1 if value in list2]
    return common