def address_book(self, *, resource=None, address_book='<STR_LIT>'):
if address_book.lower() == '<STR_LIT>':<EOL><INDENT>return AddressBook(parent=self, main_resource=resource,<EOL>name='<STR_LIT>')<EOL><DEDENT>elif address_book.lower() == '<STR_LIT>':<EOL><INDENT>return GlobalAddressList(parent=self)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>
Get an instance to the specified address book for the
        specified account resource

        :param str resource: Custom resource to be used in this address book
         (Defaults to parent main_resource)
        :param str address_book: Choose from 'Personal' or
         'GAL' (Global Address List)
        :return: a representation of the specified address book
        :rtype: AddressBook or GlobalAddressList
        :raises RuntimeError: if invalid address_book is specified