<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_comm(self):
 """ Initializes comm and attaches streams. """

        if self.comm:
            return self.comm
        comm = None
        if self.dynamic or self.renderer.widget_mode == 'live':
            comm = self.renderer.comm_manager.get_server_comm()
        return comm