code: def dump_as_two_item_tsv(record, output_file):
      """
      Dump a relation record as TSV only for 2 item relations.
  
      Arguments:
          record -- A RelationRecord instance to dump.
          output_file -- A file to output.
      """
      for ordered_stats in record.ordered_statistics:
          if len(ordered_stats.items_base) != 1:
              continue
          if len(ordered_stats.items_add) != 1:
              continue
          output_file.write(
              "{0}\t{1}\t{2:.8f}\t{3:.8f}\t{4:.8f}{5}".format(
                  list(ordered_stats.items_base)[0],
                  list(ordered_stats.items_add)[0],
                  record.support,
                  ordered_stats.confidence,
                  ordered_stats.lift,
                  os.linesep,
              )
          )
  
imports: import sys
  import csv
  import argparse
  import json
  import os
  from collections import namedtuple
  from itertools import combinations
  from itertools import chain
label_desc: Use image node_id 9 for calling a global function with example usage: dump_as_two_item_tsv(record, output_file) without return types