def METHOD_NAME(self, nanny):
    # Copy the package to the worker machine
    logger.info("Entering plugin setup")
    logger.info("nanny.local_directory: %s",nanny.local_directory)
    logger.info("nanny.worker_dir: %s",nanny.worker_dir)
    fn = os.path.join(nanny.local_directory, f"tmp-{str(uuid.uuid4())}.zip")
    with open(fn, "wb") as f:
        f.write(self.data)
    with zipfile.ZipFile(fn) as z:
        z.extractall(path=nanny.local_directory)
    if self.update_path:
        if nanny.local_directory not in sys.path:
            sys.path.insert(0, nanny.local_directory)
        path = os.path.join(nanny.local_directory, self.package)
        if path not in sys.path:
            sys.path.insert(0, path)
    # Now try to pip install the package
    package_path = os.path.join(nanny.local_directory,self.package)
    logger.info("Installing the package: %s",self.package)
    proc = subprocess.Popen(
        [sys.executable, "-m", "pip", "install"] + self.pip_options + [package_path],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    stdout, stderr = proc.communicate()
    returncode = proc.wait()
    if returncode:
        logger.error("Pip install failed with '%s'",stderr.decode().strip())
        return
    # Cleanup the zip file
    logger.info("Cleaning up temporary directory: %s",fn)
    os.remove(fn)
    return