def console_msg(self, msg):
        if "pids" in msg:
            return ",".join([str(process_id)
                             for process_id in msg.get('pids')])
        elif 'watchers' in msg:
            return ",".join([watcher for watcher in msg.get('watchers')])
        if 'reason' not in msg:
            msg['reason'] = "Response doesn't contain 'pids' nor 'watchers'."
        return self.console_error(msg)
dataset/ETHPy150Open circus-tent/circus/circus/commands/list.py/List.console_msg/original