code: def lineMatchingPattern(pattern, lines):
      
      for line in lines:
          m = pattern.match(line)
          if m:
              return m
      else:
          return None
docs: Searches through the specified list of strings and returns the regular expression 
      match for the first line that matches the specified pre-compiled regex pattern, or None if no match was found
  
      Note: if you are using a regex pattern string (i.e. not already compiled), use lineMatching() instead
  
      :type pattern: Compiled regular expression pattern to use
      :type lines: List of lines to search
  
      :return: the regular expression match for the first line that matches the specified regex, or None if no match was found
      :rtype: re.Match