code: def formataddr(pair):
      """The inverse of parseaddr(), this takes a 2-tuple of the form
      (realname, email_address) and returns the string value suitable
      for an RFC 2822 From, To or Cc header.
  
      If the first element of pair is false, then the second element is
      returned unmodified.
      """
      name, address = pair
      if name:
          quotes = ""
          if specialsre.search(name):
              quotes = '"'
          name = escapesre.sub(r"\\\g<0>", name)
          return "%s%s%s <%s>" % (quotes, name, quotes, address)
      return address
  
imports: import os
  import re
  import time
  import base64
  import random
  import socket
  import urllib
  import warnings
  from email._parseaddr import quote
  from email._parseaddr import AddressList
  from email._parseaddr import mktime_tz
  from email._parseaddr import parsedate
  from email._parseaddr import parsedate_tz
  from quopri import decodestring
  from email.encoders import _bencode, _qencode
label_desc: Use image node_id 4 for calling a global function with example usage: formataddr(pair) and returns: address, unknown