code: def get_all_chats(self):
          
          chats = self.wapi_functions.getAllChats()
          if chats:
              return [factory_chat(chat, self) for chat in chats]
          else:
              return []
docs: Fetches all chats
  
          :return: List of chats
          :rtype: list[Chat]