#NEWLINE# def _get_child_count_safely( self , i_accessible ) : #NEWLINE# #INDENT# '\n        Safely gets child count.\n\n        Arguments:\n            - i_accessible: instance of i_accessible.\n\n        Returns:\n            - int, object child count.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return i_accessible . accChildCount #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# if ( isinstance ( ex , comtypes . COMError ) and ( ex . hresult in ( CO_E_OBJNOTCONNECTED , ) ) ) : #NEWLINE# #INDENT# return 0