def METHOD_NAME(dna, mutation_chance, searchspace: Searchspace, cache=True):
    """Mutate DNA with 1/mutation_chance chance"""
    # this is actually a neighbors problem with Hamming distance, choose randomly from returned searchspace list
    if int(random.random() * mutation_chance) == 0:
        if cache:
            neighbors = searchspace.get_neighbors(tuple(dna), neighbor_method="Hamming")
        else:
            neighbors = searchspace.get_neighbors_no_cache(tuple(dna), neighbor_method="Hamming")
        if len(neighbors) > 0:
            return list(random.choice(neighbors))
    return dna