def daemonize(command, name, pidfile, logger, **kwargs):
    # This is the only function that requires daemonize.
    # Bail if we don't have it.
    if not HAS_DAEMONIZE:
        raise Exception("Need `daemonize` to run as daemon")

    _using_pidfile(pidfile, logger)
    daemon = Daemonize(
        app=name,
        pid=pidfile,
        action=command,
        logger=logging.getLogger(logger.name + ".daemon"),
        **kwargs
    )

    # Daemonize.start() calls sys.exit() for parent thread, so nothing
    # after this will execute.
    daemon.start()
Construct a collection of dag nodes for each type of data packet loaded in
dataset/ETHPy150Open facebook/sparts/sparts/daemon.py/daemonize--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_node.py/generateReadDagNodes