<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_dialogs( self, offset_date: int = 0, limit: int = 100, pinned_only: bool = False ) -> "pyrogram.Dialogs": """Use this method to get a chunk of the user's dialogs. You can get up to 100 dialogs at once. For a more convenient way of getting a user's dialogs see :meth:`iter_dialogs`. Args: offset_date (``int``):
 The offset date in Unix time taken from the top message of a :obj:`Dialog`. Defaults to 0. Valid for non-pinned dialogs only. limit (``str``, *optional*):
 Limits the number of dialogs to be retrieved. Defaults to 100. Valid for non-pinned dialogs only. pinned_only (``bool``, *optional*):
 Pass True if you want to get only pinned dialogs. Defaults to False. Returns: On success, a :obj:`Dialogs` object is returned. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. """


        while True:
            try:
                if pinned_only:
                    r = self.send(functions.messages.GetPinnedDialogs())
                else:
                    r = self.send(
                        functions.messages.GetDialogs(
                            offset_date=offset_date,
                            offset_id=0,
                            offset_peer=types.InputPeerEmpty(),
                            limit=limit,
                            hash=0,
                            exclude_pinned=True
                        )
                    )
            except FloodWait as e:
                log.warning("Sleeping {}s".format(e.x))
                time.sleep(e.x)
            else:
                break

        return pyrogram.Dialogs._parse(self, r)