def _get_chat(self) -> Dict:
if '<STR_LIT>' in self._update:<EOL><INDENT>query = self._update['<STR_LIT>']<EOL>if '<STR_LIT:message>' in query:<EOL><INDENT>return query['<STR_LIT:message>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>return {'<STR_LIT:id>': query['<STR_LIT>']}<EOL><DEDENT><DEDENT>elif '<STR_LIT>' in self._update:<EOL><INDENT>return patch_dict(<EOL>self._update['<STR_LIT>']['<STR_LIT>'],<EOL>is_inline_query=True,<EOL>)<EOL><DEDENT>elif '<STR_LIT:message>' in self._update:<EOL><INDENT>return self._update['<STR_LIT:message>']['<STR_LIT>']<EOL><DEDENT>
As Telegram changes where the chat object is located in the response,
this method tries to be smart about finding it in the right place.