def __init__(self,<EOL>client_address="<STR_LIT:127.0.0.1>",<EOL>interchange_address="<STR_LIT:127.0.0.1>",<EOL>client_ports=(<NUM_LIT>, <NUM_LIT>, <NUM_LIT>),<EOL>worker_ports=None,<EOL>worker_port_range=(<NUM_LIT>, <NUM_LIT>),<EOL>heartbeat_threshold=<NUM_LIT>,<EOL>logdir="<STR_LIT:.>",<EOL>logging_level=logging.INFO,<EOL>poll_period=<NUM_LIT:10>,<EOL>suppress_failure=False,<EOL>):
self.logdir = logdir<EOL>try:<EOL><INDENT>os.makedirs(self.logdir)<EOL><DEDENT>except FileExistsError:<EOL><INDENT>pass<EOL><DEDENT>start_file_logger("<STR_LIT>".format(self.logdir), level=logging_level)<EOL>logger.debug("<STR_LIT>")<EOL>self.client_address = client_address<EOL>self.interchange_address = interchange_address<EOL>self.suppress_failure = suppress_failure<EOL>self.poll_period = poll_period<EOL>logger.info("<STR_LIT>".format(<EOL>client_address, client_ports[<NUM_LIT:0>], client_ports[<NUM_LIT:1>], client_ports[<NUM_LIT:2>]))<EOL>self.context = zmq.Context()<EOL>self.task_incoming = self.context.socket(zmq.DEALER)<EOL>self.task_incoming.set_hwm(<NUM_LIT:0>)<EOL>self.task_incoming.RCVTIMEO = <NUM_LIT:10>  <EOL>self.task_incoming.connect("<STR_LIT>".format(client_address, client_ports[<NUM_LIT:0>]))<EOL>self.results_outgoing = self.context.socket(zmq.DEALER)<EOL>self.results_outgoing.set_hwm(<NUM_LIT:0>)<EOL>self.results_outgoing.connect("<STR_LIT>".format(client_address, client_ports[<NUM_LIT:1>]))<EOL>self.command_channel = self.context.socket(zmq.REP)<EOL>self.command_channel.RCVTIMEO = <NUM_LIT:1000>  <EOL>self.command_channel.connect("<STR_LIT>".format(client_address, client_ports[<NUM_LIT:2>]))<EOL>logger.info("<STR_LIT>")<EOL>self.pending_task_queue = queue.Queue(maxsize=<NUM_LIT:10> ** <NUM_LIT:6>)<EOL>self.worker_ports = worker_ports<EOL>self.worker_port_range = worker_port_range<EOL>self.task_outgoing = self.context.socket(zmq.ROUTER)<EOL>self.task_outgoing.set_hwm(<NUM_LIT:0>)<EOL>self.results_incoming = self.context.socket(zmq.ROUTER)<EOL>self.results_incoming.set_hwm(<NUM_LIT:0>)<EOL>if self.worker_ports:<EOL><INDENT>self.worker_task_port = self.worker_ports[<NUM_LIT:0>]<EOL>self.worker_result_port = self.worker_ports[<NUM_LIT:1>]<EOL>self.task_outgoing.bind("<STR_LIT>".format(self.worker_task_port))<EOL>self.results_incoming.bind("<STR_LIT>".format(self.worker_result_port))<EOL><DEDENT>else:<EOL><INDENT>self.worker_task_port = self.task_outgoing.bind_to_random_port('<STR_LIT>',<EOL>min_port=worker_port_range[<NUM_LIT:0>],<EOL>max_port=worker_port_range[<NUM_LIT:1>], max_tries=<NUM_LIT:100>)<EOL>self.worker_result_port = self.results_incoming.bind_to_random_port('<STR_LIT>',<EOL>min_port=worker_port_range[<NUM_LIT:0>],<EOL>max_port=worker_port_range[<NUM_LIT:1>], max_tries=<NUM_LIT:100>)<EOL><DEDENT>logger.info("<STR_LIT>".format(<EOL>self.worker_task_port, self.worker_result_port))<EOL>self._ready_manager_queue = {}<EOL>self.heartbeat_threshold = heartbeat_threshold<EOL>self.current_platform = {'<STR_LIT>': PARSL_VERSION,<EOL>'<STR_LIT>': "<STR_LIT>".format(sys.version_info.major,<EOL>sys.version_info.minor,<EOL>sys.version_info.micro),<EOL>'<STR_LIT>': platform.system(),<EOL>'<STR_LIT>': platform.node(),<EOL>'<STR_LIT>': os.getcwd()}<EOL>logger.info("<STR_LIT>".format(self.current_platform))<EOL>
Parameters
----------
client_address : str
     The ip address at which the parsl client can be reached. Default: "127.0.0.1"

interchange_address : str
     The ip address at which the workers will be able to reach the Interchange. Default: "127.0.0.1"

client_ports : triple(int, int, int)
     The ports at which the client can be reached

worker_ports : tuple(int, int)
     The specific two ports at which workers will connect to the Interchange. Default: None

worker_port_range : tuple(int, int)
     The interchange picks ports at random from the range which will be used by workers.
     This is overridden when the worker_ports option is set. Defauls: (54000, 55000)

heartbeat_threshold : int
     Number of seconds since the last heartbeat after which worker is considered lost.

logdir : str
     Parsl log directory paths. Logs and temp files go here. Default: '.'

logging_level : int
     Logging level as defined in the logging module. Default: logging.INFO (20)

poll_period : int
     The main thread polling period, in milliseconds. Default: 10ms

suppress_failure : Bool
     When set to True, the interchange will attempt to suppress failures. Default: False