code: def extract(args):
      
      p = OptionParser(extract.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      idsfile, sizesfile = args
      sizes = Sizes(sizesfile).mapping
      fp = open(idsfile)
      for row in fp:
          name = row.strip()
          size = sizes[name]
          print("\t".join(str(x) for x in (name, size)))
docs: %prog extract idsfile sizesfile
  
      Extract the lines containing only the given IDs.