public function process_analysable(\core_analytics\analysable $analysable): array {

        // Target instances scope is per-analysable (it can't be lower as calculations run once per
        // analysable, not time splitting method nor time range).
        $target = call_user_func(array($this->analyser->get_target(), 'instance'));

        // We need to check that the analysable is valid for the target even if we don't include targets
        // as we still need to discard invalid analysables for the target.
        $isvalidresult = $target->is_valid_analysable($analysable, $this->includetarget);
        if ($isvalidresult !== true) {
            $a = new \stdClass();
            $a->analysableid = $analysable->get_name();
            $a->result = $isvalidresult;
            $this->analyser->add_log(get_string('analysablenotvalidfortarget', 'analytics', $a));
            return array();
        }

        // Process all provided time splitting methods.
        $results = array();
        foreach ($this->analyser->get_timesplittings() as $timesplitting) {

            $cachedresult = $this->result->retrieve_cached_result($timesplitting, $analysable);
            if ($cachedresult) {
                $result = new \stdClass();
                $result->result = $cachedresult;
                $results[$timesplitting->get_id()] = $result;
                continue;
            }

            $results[$timesplitting->get_id()] = $this->process_time_splitting($timesplitting, $analysable, $target);
        }

        return $results;
    }