def METHOD_NAME(self):
    from kivy.lang import Builder
    from kivy.uix.behaviors.knspace import knspace, KNSpaceBehavior
    from kivy.uix.widget import Widget
    class NamedWidget(KNSpaceBehavior, Widget):
        pass
    nw = NamedWidget()
    w = Widget()
    w2 = Widget()
    before = knspace.fork()
    knspace.widget2 = w
    after = knspace.fork()
    self.assertEqual(knspace.widget2, w)
    self.assertEqual(before.widget2, w)
    self.assertEqual(after.widget2, w)
    child = knspace.fork()
    child2 = knspace.fork()
    grandchild = child.fork()
    child.widget3 = w2
    self.assertEqual(grandchild.widget3, w2)
    self.assertEqual(child.widget3, w2)
    # this could actually be none rather than raising, depending
    # on when the class was instantiated. So if this fails, change the
    # test to assert is none.
    self.assertIsNone(knspace.widget3)
    grandchild.parent = child2
    self.assertIsNone(grandchild.widget3)