<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_representative_chain(self, seqprop, structprop, chains_to_check=None, seq_ident_cutoff=0.5, allow_missing_on_termini=0.2, allow_mutants=True, allow_deletions=False, allow_insertions=False, allow_unresolved=True):
 """Set and return the representative chain based on sequence quality checks to a reference sequence. Args: seqprop (SeqProp):
 SeqProp object to compare to chain sequences structprop (StructProp):
 StructProp object with chains to compare to in the ``mapped_chains`` attribute. If there are none present, ``chains_to_check`` can be specified, otherwise all chains are checked. chains_to_check (str, list):
 Chain ID or IDs to check for sequence coverage quality seq_ident_cutoff (float):
 Percent sequence identity cutoff, in decimal form allow_missing_on_termini (float):
 Percentage of the total length of the reference sequence which will be ignored when checking for modifications. Example: if 0.1, and reference sequence is 100 AA, then only residues 5 to 95 will be checked for modifications. allow_mutants (bool):
 If mutations should be allowed or checked for allow_deletions (bool):
 If deletions should be allowed or checked for allow_insertions (bool):
 If insertions should be allowed or checked for allow_unresolved (bool):
 If unresolved residues should be allowed or checked for Returns: str: the best chain ID, if any """

        if chains_to_check:
            chains_to_check = ssbio.utils.force_list(chains_to_check)
        elif structprop.mapped_chains:
            chains_to_check = structprop.mapped_chains
        else:
            log.warning('{}-{}: no chains specified in structure to align to, all chains will be checked'.format(seqprop.id,
                                                                                                                 structprop.id))
            chains_to_check = structprop.chains.list_attr('id')

        for chain_id in chains_to_check:
            try:
                # Compare sequence to structure's sequence using the alignment
                found_good_chain = self.check_structure_chain_quality(seqprop=seqprop, structprop=structprop, chain_id=chain_id,
                                                                      seq_ident_cutoff=seq_ident_cutoff,
                                                                      allow_missing_on_termini=allow_missing_on_termini,
                                                                      allow_mutants=allow_mutants,
                                                                      allow_deletions=allow_deletions,
                                                                      allow_insertions=allow_insertions,
                                                                      allow_unresolved=allow_unresolved)
            except ValueError:
                log.error('{}-{}: unable to check chain "{}"'.format(seqprop.id, structprop.id, chain_id))
                found_good_chain = False

            # If found_good_chain = True, return chain ID
            # If not, move on to the next potential chain
            if found_good_chain:
                stats = self.get_seqprop_to_structprop_alignment_stats(seqprop=seqprop, structprop=structprop, chain_id=chain_id)
                self.representative_chain = chain_id
                self.representative_chain_seq_coverage = stats['percent_identity']
                return chain_id
        else:
            log.debug('{}: no chains meet quality checks'.format(structprop.id))
            return None