search for correct chat is linear, ~O(N), as number of chat will unlikely be unbearable (?)
two separate __init__ arguments are used (both optional because...backward compatibility?), since saved_messages chat doesn't have the "name" key (maybe better to infer saved messages by leaving chat_name empty, and get rid of saved_messages flag?)
use saved_messages boolean flag to parse saved messages
use chat_name to choose the chat to parse
(PyCharm auto formatter touched imports, but they seem to be fine)
(PyCharm auto formatter touched imports, but they seem to be fine)