def _call(self, method_name_int, **kwargs):
        """Runs the given API method directly on the CCU using a tclsh process.

        The API method needs to be one of the methods which are available
        on the device (with the given arguments)."""
        with self._api_lock:
            try:
                return self._do_call(method_name_int, **kwargs)
            except PMException:
                raise

            except IOError as e:
                # Try to restart in case of issues with the tclsh process. This seem to often happen
                # after 601 (TCL error) responses. Try to deal with it.
                self.logger.warning("Exception in API call (%s). Restarting tclsh "
                                    "and retrying this API call.", e)
                self._init_tclsh()
                response = self._do_call(method_name_int, **kwargs)
                return response