def detect_cycle(history, min_size=1, offset=0):
    history_tail = history[-offset:]
    for i in range(min_size, len(history_tail) // 2):
        cycle = tuple(history_tail[:i])
        for j,  elem in enumerate(history_tail):
            if elem != cycle[j % len(cycle)]:
                break
        if j == len(history_tail) - 1:
            # We made it to the end, is the cycle itself a cycle?
            # I.E. CCC is not ok as cycle if min_size is really 2
            # Since this is the same as C
            return cycle
    return None
Gets the ``image_file`` from store. Returns ``None`` if not found.
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/_strategy_utils.py/detect_cycle--crossover with--dataset/ETHPy150Open mariocesar/sorl-thumbnail/sorl/thumbnail/kvstores/base.py/KVStoreBase.get