def get_dynamic_descriptor_children(descriptor, user_id, module_creator=None, usage_key_filter=None):
 module_children = []
 if descriptor.has_dynamic_children():
  module = None
  if (descriptor.scope_ids.user_id and (user_id == descriptor.scope_ids.user_id)):
   module = descriptor
  elif module_creator:
   module = module_creator(descriptor)
  if module:
   module_children = module.get_child_descriptors()
 else:
  module_children = descriptor.get_children(usage_key_filter)
 return module_children

def get_dynamic_descriptor_children ( descriptor , user_id , module_creator = None , usage_key_filter = None ) : module_children = [ ] if descriptor . has_dynamic_children ( ) : module = None if ( descriptor . scope_ids . user_id and ( user_id == descriptor . scope_ids . user_id ) ) : module = descriptor elif module_creator : module = module_creator ( descriptor ) if module : module_children = module . get_child_descriptors ( ) else : module_children = descriptor . get_children ( usage_key_filter ) return module_children
returns the children of the given descriptor .