<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_messages( self, chat_id: Union[int, str], message_ids: Iterable[int], revoke: bool = True ) -> bool: """Use this method to delete messages, including service messages. Args: chat_id (``int`` | ``str``):
 Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use "me" or "self". For a contact that exists in your Telegram address book you can use his phone number (str). message_ids (``iterable``):
 A list of Message identifiers to delete or a single message id. Iterators and Generators are also accepted. revoke (``bool``, *optional*):
 Deletes messages on both parts. This is only for private cloud chats and normal groups, messages on channels and supergroups are always revoked (i.e.: deleted for everyone). Defaults to True. Returns: True on success, False otherwise. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. """

        peer = self.resolve_peer(chat_id)
        message_ids = list(message_ids) if not isinstance(message_ids, int) else [message_ids]

        if isinstance(peer, types.InputPeerChannel):
            r = self.send(
                functions.channels.DeleteMessages(
                    channel=peer,
                    id=message_ids
                )
            )
        else:
            r = self.send(
                functions.messages.DeleteMessages(
                    id=message_ids,
                    revoke=revoke or None
                )
            )

        # Deleting messages you don't have right onto, won't raise any error.
        # Check for pts_count, which is 0 in case deletes fail.
        return bool(r.pts_count)