code: def extract_characters(context: str) -> Dict[str, str]:
      """
      Extract characters from context.
  
      :param context:
          context string
  
      :return characters:
          return the two characters within the conversation; in dict form,
          mapping _self_name --> self character; _partner_name --> partner character
      """
      name_lines = [
          l
          for l in context.split("\n")
          if "_partner_name" in l or "_self_name" in l
      ]
      characters = {
          n.split()[0]: " ".join(n.split()[1:]) for n in name_lines
      }
      return characters
  
imports: from collections import deque
  import random
  from typing import Dict
label_desc: Use image node_id 2 for calling a global function with example usage: extract_characters(context) and returns: characters