def __init__(self,<EOL>task_q_url="<STR_LIT>",<EOL>result_q_url="<STR_LIT>",<EOL>cores_per_worker=<NUM_LIT:1>,<EOL>max_workers=float('<STR_LIT>'),<EOL>prefetch_capacity=<NUM_LIT:0>,<EOL>uid=None,<EOL>block_id=None,<EOL>heartbeat_threshold=<NUM_LIT>,<EOL>heartbeat_period=<NUM_LIT:30>,<EOL>poll_period=<NUM_LIT:10>):
logger.info("<STR_LIT>")<EOL>self.context = zmq.Context()<EOL>self.task_incoming = self.context.socket(zmq.DEALER)<EOL>self.task_incoming.setsockopt(zmq.IDENTITY, uid.encode('<STR_LIT:utf-8>'))<EOL>self.task_incoming.setsockopt(zmq.LINGER, <NUM_LIT:0>)<EOL>self.task_incoming.connect(task_q_url)<EOL>self.result_outgoing = self.context.socket(zmq.DEALER)<EOL>self.result_outgoing.setsockopt(zmq.IDENTITY, uid.encode('<STR_LIT:utf-8>'))<EOL>self.result_outgoing.setsockopt(zmq.LINGER, <NUM_LIT:0>)<EOL>self.result_outgoing.connect(result_q_url)<EOL>logger.info("<STR_LIT>")<EOL>self.uid = uid<EOL>self.block_id = block_id<EOL>cores_on_node = multiprocessing.cpu_count()<EOL>self.max_workers = max_workers<EOL>self.prefetch_capacity = prefetch_capacity<EOL>self.worker_count = min(max_workers,<EOL>math.floor(cores_on_node / cores_per_worker))<EOL>logger.info("<STR_LIT>".format(self.worker_count))<EOL>self.pending_task_queue = multiprocessing.Queue()<EOL>self.pending_result_queue = multiprocessing.Queue()<EOL>self.ready_worker_queue = multiprocessing.Queue()<EOL>self.max_queue_size = self.prefetch_capacity + self.worker_count<EOL>self.tasks_per_round = <NUM_LIT:1><EOL>self.heartbeat_period = heartbeat_period<EOL>self.heartbeat_threshold = heartbeat_threshold<EOL>self.poll_period = poll_period<EOL>
Parameters
----------
worker_url : str
     Worker url on which workers will attempt to connect back

uid : str
     string unique identifier

block_id : str
     Block identifier that maps managers to the provider blocks they belong to.

cores_per_worker : float
     cores to be assigned to each worker. Oversubscription is possible
     by setting cores_per_worker < 1.0. Default=1

max_workers : int
     caps the maximum number of workers that can be launched.
     default: infinity

prefetch_capacity : int
     Number of tasks that could be prefetched over available worker capacity.
     When there are a few tasks (<100) or when tasks are long running, this option should
     be set to 0 for better load balancing. Default is 0.

heartbeat_threshold : int
     Seconds since the last message from the interchange after which the
     interchange is assumed to be un-available, and the manager initiates shutdown. Default:120s

     Number of seconds since the last message from the interchange after which the worker
     assumes that the interchange is lost and the manager shuts down. Default:120

heartbeat_period : int
     Number of seconds after which a heartbeat message is sent to the interchange

poll_period : int
     Timeout period used by the manager in milliseconds. Default: 10ms