def METHOD_NAME(fn):
    if isinstance(fn, str):
        fn = open(fn)
    for row in csv.DictReader(fn):
        given = row['First']
        family = row['Last']
        party = row['Party'].decode('utf-8')
        party = PARTY_YNMP_TO_TWFY.get(party, party)
        cons = row['Constituency'].decode('utf-8')
        person_id = None
        if row['parlparse_id']:
            person_id = 'uk.org.publicwhip/person/{0}'.format(row['parlparse_id'])
        yield {'given_name': given, 'family_name': family}, party, cons, person_id