Write a function that takes two lists of strings (or text files), compares them, and separates matching strings into one list and differing strings into another list.
Asked in the Phone Screen stage. Implement the list version using the signature below. Treat the inputs as multisets: duplicate occurrences matter. Return [matching, differing], preserving the order of occurrences from the first list, followed by unmatched occurrences from the second list. Each occurrence can be matched only once.
Input: Two lists of strings.
Output: A two-element list containing the matching strings and differing strings.
Example: list1 = ["error", "info", "error"], list2 = ["error", "warn"] returns [["error"], ["info", "error", "warn"]].
def compare_string_lists(list1, list2):