classFirstDict(OrderedDict[_KT,_VT]):"""Dict with method to get its first value."""deffirst(self)->Optional[_VT]:"""Return the first value in the dict or None if dict is empty."""returnnext(iter(self.values()),None)
first()
Return the first value in the dict or None if dict is empty.