code: def map_uniprot_to_pdb(self, seq_ident_cutoff=0.0, outdir=None, force_rerun=False):
          if not self.representative_sequence:
              log.error('{}: no representative sequence set, cannot use best structures API'.format(self.id))
              return None
          uniprot_id = self.representative_sequence.uniprot
          if not uniprot_id:
              log.error('{}: no representative UniProt ID set, cannot use best structures API'.format(self.id))
              return None
          if '-' in uniprot_id:
              log.debug('{}: "-" detected in UniProt ID, isoform specific sequences are ignored with best structures API'.format(self.id))
              uniprot_id = uniprot_id.split('-')[0]
          if not outdir:
              outdir = self.sequence_dir
              if not outdir:
                  raise ValueError('Output directory must be specified')
          best_structures = ssbio.databases.pdb.best_structures(uniprot_id,
                                                                outname='{}_best_structures'.format(custom_slugify(uniprot_id)),
                                                                outdir=outdir,
                                                                seq_ident_cutoff=seq_ident_cutoff,
                                                                force_rerun=force_rerun)
          new_pdbs = []
          if best_structures:
              rank = 1
              for best_structure in best_structures:
                  currpdb = str(best_structure['pdb_id'].lower())
                  new_pdbs.append(currpdb)
                  currchain = str(best_structure['chain_id'])
                  new_pdb = self.load_pdb(pdb_id=currpdb, mapped_chains=currchain)
                  new_pdb.add_chain_ids(currchain)
                  pdb_specific_keys = ['experimental_method', 'resolution']
                  chain_specific_keys = ['coverage', 'start', 'end', 'unp_start', 'unp_end']
                  new_pdb.update(best_structure, only_keys=pdb_specific_keys)
                  new_chain = new_pdb.chains.get_by_id(currchain)
                  new_chain.update(best_structure, only_keys=chain_specific_keys)
                  new_chain.update({'rank': rank})
                  rank += 1
              log.debug('{}, {}: {} PDB/chain pairs mapped'.format(self.id, uniprot_id, len(best_structures)))
          else:
              log.debug('{}, {}: no PDB/chain pairs mapped'.format(self.id, uniprot_id))
          return new_pdbs