def METHOD_NAME(langs, macro, out_dir):
    lang_file = open(os.path.join(out_dir, 'iso_languages.tsv'), 'w')
    writer = csv.writer(lang_file, delimiter='\t')
    writer.writerow(('ISO 639-3', 'ISO 639-2B', 'ISO 639-2T',
                     'ISO 639-1', 'type', 'macro'))
    macro_reader = csv.reader(StringIO(macro), delimiter='\t')
    headers = macro_reader.next()
    assert len(headers) == 3
    macros = {minor_code: macro_code for (macro_code, minor_code, status)
              in macro_reader if status != RETIRED}
    lang_reader = csv.reader(StringIO(langs), delimiter='\t')
    headers = lang_reader.next()
    assert headers[:6] == ['Id', 'Part2B', 'Part2T',
                           'Part1', 'Scope', 'Language_Type']
    for line in lang_reader:
        iso639_3, iso639_2b, iso639_2t, iso639_1, scope, lang_type = line[:6]
        macro = macros.get(iso639_3, '')
        # Only living languages that are either individual or macro
        if scope in (INDIVIDUAL, MACRO) and lang_type == LIVING:
            writer.writerow((iso639_3, iso639_2b, iso639_2t,
                             iso639_1, scope, macro))