public function getServiceInstanceByGroup($group)
    {
        $services = [];
        $services_map = static::services();

        foreach ($this->getServiceInstances() as $name => $info) {
            if (!isset($info['type']) || !isset($info['instance'])) {
                continue;
            }
            $type = $info['type'];

            if (!isset($services_map[$type])) {
                continue;
            }
            $classname = $services_map[$type];

            if ($group !== $classname::group()) {
                continue;
            }
            $services[$name] = $info['instance'];
        }

        return $services;
    }