def _match_dialog(self, query, dialogues=None):
        """Tries to match in dialogues

        :param query: message tuple
        :type query: Tuple[bytes]
        :return: response if found or None
        :rtype: Tuple[bytes] | None
        """
        if dialogues is None:
            dialogues = self._dialogues

        # Try to match in the queries
        if query in dialogues:
            response = dialogues[query]
            logger.debug('Found response in queries: %s' % repr(response))

            return response
def _match_dialog ( self , query , dialogues = None ) : if dialogues is None : dialogues = self . _dialogues if query in dialogues : response = dialogues [ query ] logger . debug ( 'Found response in queries: %s' % repr ( response ) ) return response
Tries to match in dialogues

        :param query: message tuple
        :type query: Tuple[bytes]
        :return: response if found or None
        :rtype: Tuple[bytes] | None