<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_contacts(self):
 """Use this method to get contacts from your Telegram address book. Returns: On success, a list of :obj:`User` objects is returned. Raises: :class:`RPCError <pyrogram.RPCError>` in case of a Telegram RPC error. """

        while True:
            try:
                contacts = self.send(functions.contacts.GetContacts(hash=0))
            except FloodWait as e:
                log.warning("get_contacts flood: waiting {} seconds".format(e.x))
                time.sleep(e.x)
            else:
                log.info("Total contacts: {}".format(len(self.peers_by_phone)))
                return [pyrogram.User._parse(self, user) for user in contacts.users]