human
I wrote the below code

    import sys
    savedModules = sys.modules.copy()
    savedPluginPath = list(plugins.__path__)
    def cleanup():
        sys.modules.clear()
        sys.modules.update(savedModules)
        plugins.__path__[:] = savedPluginPath
    testCase.addCleanup(cleanup)
    fp = FilePath(testCase.mktemp())
    fp.createDirectory()
    getModule(__name__).filePath.sibling(dropinSource).copyTo(fp.child(dropinSource))
    plugins.__path__.append(fp.path)

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def addFakePlugin(testCase, dropinSource='fakeendpoint.py'):