def METHOD_NAME(self):
    # If the source is a child, the parent of the shadow should be the same as the source
    shadow_child = self.factory.new_shadow_module("shadow_child_module", self.child_module, with_form=False)
    self.factory.app.save()
    handle_shadow_child_modules(self.app, self.app.get_module_by_unique_id(shadow_child.unique_id))
    app = Application.get(self.app.get_id)
    shadow_child = app.get_module_by_unique_id(shadow_child.unique_id)
    self.assertEqual(shadow_child.root_module_id, self.child_module.root_module_id)
    # change the source
    shadow_child.source_module_id = self.basic_module.unique_id
    app.save()
    handle_shadow_child_modules(app, app.get_module_by_unique_id(shadow_child.unique_id))
    app = Application.get(self.app.get_id)
    shadow_child = app.get_module_by_unique_id(shadow_child.unique_id)
    self.assertIsNone(shadow_child.root_module_id)