#NEWLINE# def OpenChildren( self , children = None , mode = 'r' , limit = 1000000 , chunk_limit = 100000 , age = NEWEST_TIME ) : #NEWLINE# #INDENT# 'Yields AFF4 Objects of all our direct children.\n\n    This method efficiently returns all attributes for our children directly, in\n    a few data store round trips. We use the directory indexes to query the data\n    store.\n\n    Args:\n      children: A list of children RDFURNs to open. If None open all our\n             children.\n      mode: The mode the files should be opened with.\n      limit: Total number of items we will attempt to retrieve.\n      chunk_limit: Maximum number of items to retrieve at a time.\n      age: The age of the items to retrieve. Should be one of ALL_TIMES,\n           NEWEST_TIME or a range.\n    Yields:\n      Instances for each direct child.\n    ' #NEWLINE# if ( children is None ) : #NEWLINE# #INDENT# subjects = list ( self . ListChildren ( limit = limit , age = age ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# subjects = list ( children ) #NEWLINE# #UNINDENT# subjects . sort ( ) #NEWLINE# while subjects : #NEWLINE# #INDENT# to_read = subjects [ : chunk_limit ] #NEWLINE# subjects = subjects [ chunk_limit : ] #NEWLINE# for child in FACTORY . MultiOpen ( to_read , mode = mode , token = self . token , age = age ) : #NEWLINE# #INDENT# ( yield child )