@staticmethod@logdef_parse_seed_motif(key:str,motif_item:dict)->Motif:motif_dict=copy.deepcopy(motif_item)motif_dict["identifier"]=keyif'hamming_distance_probabilities'inmotif_dictandmotif_dict['hamming_distance_probabilities']isnotNone:motif_dict['hamming_distance_probabilities']={key:float(value)forkey,valueinmotif_dict['hamming_distance_probabilities'].items()}assertall(isinstance(key,int)forkeyinmotif_dict['hamming_distance_probabilities'].keys()) \
andall(isinstance(val,float)forvalinmotif_dict['hamming_distance_probabilities'].values()) \
and0.99<=sum(motif_dict['hamming_distance_probabilities'].values())<=1, \
"For each possible Hamming distance a probability between 0 and 1 has to be assigned " \
"so that the probabilities for all distance possibilities sum to 1."motif=SeedMotif(**motif_dict)returnmotif