from itertools import groupby
def shortest_identical_consecutive_sublist(lst):
groups = [list(g) for _, g in groupby(lst)]
groups = [g for g in groups if len(g) >= 2]
return min(groups, key=len) if groups else []
lst = [3, 3, 3, 7, 7, 7, 7, 7, 4, 4, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9]
print(shortest_identical_consecutive_sublist(lst))
'''
run:
[4, 4]
'''