def __init__(self, *args, **kwargs):
child_relation_names = (<EOL>[rel.get_accessor_name() for rel in get_all_child_relations(self)] +<EOL>[field.name for field in get_all_child_m2m_relations(self)]<EOL>)<EOL>if any(name in kwargs for name in child_relation_names):<EOL><INDENT>kwargs_for_super = kwargs.copy()<EOL>relation_assignments = {}<EOL>for rel_name in child_relation_names:<EOL><INDENT>if rel_name in kwargs:<EOL><INDENT>relation_assignments[rel_name] = kwargs_for_super.pop(rel_name)<EOL><DEDENT><DEDENT>super(ClusterableModel, self).__init__(*args, **kwargs_for_super)<EOL>for (field_name, related_instances) in relation_assignments.items():<EOL><INDENT>setattr(self, field_name, related_instances)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>super(ClusterableModel, self).__init__(*args, **kwargs)<EOL><DEDENT>
Extend the standard model constructor to allow child object lists to be passed in
via kwargs