def _parse_persons(self, datafield, subfield, roles=["<STR_LIT>"]):
<EOL>parsed_persons = []<EOL>raw_persons = self.get_subfields(datafield, subfield)<EOL>for person in raw_persons:<EOL><INDENT>other_subfields = person.other_subfields<EOL>if "<STR_LIT:4>" in other_subfields and roles != ["<STR_LIT>"]:<EOL><INDENT>person_roles = other_subfields["<STR_LIT:4>"]  <EOL>relevant = any(map(lambda role: role in roles, person_roles))<EOL>if not relevant:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>ind1 = person.i1<EOL>ind2 = person.i2<EOL>person = person.strip()<EOL>name = "<STR_LIT>"<EOL>second_name = "<STR_LIT>"<EOL>surname = "<STR_LIT>"<EOL>title = "<STR_LIT>"<EOL>if ind1 == "<STR_LIT:1>" and ind2 == "<STR_LIT:U+0020>":<EOL><INDENT>if "<STR_LIT:U+002C>" in person:<EOL><INDENT>surname, name = person.split("<STR_LIT:U+002C>", <NUM_LIT:1>)<EOL><DEDENT>elif "<STR_LIT:U+0020>" in person:<EOL><INDENT>surname, name = person.split("<STR_LIT:U+0020>", <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>surname = person<EOL><DEDENT>if "<STR_LIT:c>" in other_subfields:<EOL><INDENT>title = "<STR_LIT:U+002C>".join(other_subfields["<STR_LIT:c>"])<EOL><DEDENT><DEDENT>elif ind1 == "<STR_LIT:0>" and ind2 == "<STR_LIT:U+0020>":<EOL><INDENT>name = person.strip()<EOL>if "<STR_LIT:b>" in other_subfields:<EOL><INDENT>second_name = "<STR_LIT:U+002C>".join(other_subfields["<STR_LIT:b>"])<EOL><DEDENT>if "<STR_LIT:c>" in other_subfields:<EOL><INDENT>surname = "<STR_LIT:U+002C>".join(other_subfields["<STR_LIT:c>"])<EOL><DEDENT><DEDENT>elif ind1 == "<STR_LIT:1>" and ind2 == "<STR_LIT:0>" or ind1 == "<STR_LIT:0>" and ind2 == "<STR_LIT:0>":<EOL><INDENT>name = person.strip()<EOL>if "<STR_LIT:c>" in other_subfields:<EOL><INDENT>title = "<STR_LIT:U+002C>".join(other_subfields["<STR_LIT:c>"])<EOL><DEDENT><DEDENT>parsed_persons.append(<EOL>Person(<EOL>name.strip(),<EOL>second_name.strip(),<EOL>surname.strip(),<EOL>title.strip()<EOL>)<EOL>)<EOL><DEDENT>return parsed_persons<EOL>
Parse persons from given datafield.

Args:
    datafield (str): code of datafield ("010", "730", etc..)
    subfield (char):  code of subfield ("a", "z", "4", etc..)
    role (list of str): set to ["any"] for any role, ["aut"] for
         authors, etc.. For details see
         http://www.loc.gov/marc/relators/relaterm.html

Main records for persons are: "100", "600" and "700", subrecords "c".

Returns:
    list: Person objects.