def test_moduleIsMerged(self):
        """
        Merging C{foo} into C{bar} returns a function with C{foo}'s
        C{__module__}.
        """
        def foo():
            pass

        def bar():
            pass
        bar.__module__ = 'somewhere.else'

        baz = util.mergeFunctionMetadata(foo, bar)
        self.assertEqual(baz.__module__, foo.__module__)

        Merging C{foo} into C{bar} returns a function with C{foo}'s
        C{__module__}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_util.py