code: def extract_first_line_failure(failures_short_lines):
      failures = {}
      file = None
      in_error = False
      for line in failures_short_lines.split("\n"):
          if re.search(r"_ \[doctest\]", line):
              in_error = True
              file = line.split(" ")[2]
          elif in_error and not line.split(" ")[0].isdigit():
              failures[file] = line
              in_error = False
  
      return failures
  
imports: import collections
  import json
  import math
  import os
  import re
  import time
  from fnmatch import fnmatch
  from typing import Dict, List
  import requests
  from slack_sdk import WebClient
label_desc: Use image node_id 2 for calling a global function with example usage: extract_first_line_failure(failures_short_lines) and returns: failures