async def METHOD_NAME(conn: napi.SearchConnection,
                       results: List[ReverseResult],
                       writer: 'csv.DictWriter[str]',
                       lang: Optional[str]) -> None:
    await add_result_details(conn, results,
                             LookupDetails(address_details=True))
    locale = napi.Locales([lang] if lang else None)
    for result in results:
        data = {'placeid': result.place_id,
                'postcode': result.postcode}
        result.localize(locale)
        for line in (result.address_rows or []):
            if line.isaddress and line.local_name:
                if line.category[1] == 'postcode':
                    data['postcode'] = line.local_name
                elif line.rank_address in RANK_TO_OUTPUT_MAP:
                    data[RANK_TO_OUTPUT_MAP[line.rank_address]] = line.local_name
        writer.writerow(data)