Can you write a Python script to parse a text file and extract specific log patterns?
Implement parse_log_patterns(text, patterns), where text is the file content and patterns maps pattern names to valid regular expressions. Return a dictionary mapping each name to matching lines in their original order. A line belongs to every pattern it matches.
text: string. patterns: dictionary of string names to regex strings. Return dict[str, list[str]]; omit no pattern names, even when there are no matches.
def parse_log_patterns(text, patterns):