private function init_analysable_analysis(string $timesplittingid, int $analysableid) {

        // Do not include $this->includetarget as we don't want the same analysable to be analysed for training
        // and prediction at the same time.
        $lockkey = 'modelid:' . $this->analyser->get_modelid() . '-analysableid:' . $analysableid .
            '-timesplitting:' . self::clean_time_splitting_id($timesplittingid);

        // Large timeout as processes may be quite long.
        $lockfactory = \core\lock\lock_config::get_lock_factory('core_analytics');

        // If it is not ready in 10 secs skip this model + analysable + timesplittingmethod combination
        // it will attempt it again during next cron run.
        if (!$this->lock = $lockfactory->get_lock($lockkey, 10)) {
            return false;
        }
        return true;
    }