in optimum/executorch/attentions/custom_kv_cache.py [0:0]
def from_legacy_cache( cls, config, legacy_cache, max_cache_len=None, device=None, dtype=None,