def METHOD_NAME(self, nanny):
    for fname in self.extra_inputs:
        logger.info(f"Removing: {fname}")
        path = os.path.join(nanny.local_directory,fname)
        os.remove(path)
    logger.info("Uninstalling the package: %s",self.package)
    proc = subprocess.Popen(
        [sys.executable, "-m", "pip", "uninstall", self.package],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    stdout, stderr = proc.communicate()
    returncode = proc.wait()
    if returncode:
        logger.error("Pip uninstall failed with '%s'",stderr.decode().strip())
        return
    return