def METHOD_NAME(mod, modName, parent):
    """
    Make this part a separate function so we can share it with PYMEVis
    """
    # record dsviewer keyw so we can warn if we inject into dsviewer class
    # part of module injection deprecation
    dsv_keys = list(parent.__dict__.keys())
    t1 = time.time()
    ret = mod.Plug(parent)
    dt = time.time() - t1
    #logger.debug('%s.Plug() took %3.2f s' % (modName, dt))
    if list(parent.__dict__.keys()) != dsv_keys:
        logger.warning('Plugin [%s] injects into parent namespace, could result in circular references' % modName)
    # new style module tracking
    # TODO - make this accessible via dsviewer.plugins.x rather than dsviewer.x
    if ret is not None:
        if isinstance(ret, dict):
            # either track named outputs [legacy]
            for k, v in ret.items():
                setattr(parent, k, weakref.proxy(v))
        else:
            # or track module data under module name.
            setattr(parent, modName, weakref.proxy(ret))
            #dsviewer._module_injections[modName] = ret
    if hasattr(parent, 'installedModules'):
        parent.installedModules.append(modName)