get the service from the settings
501260
def load_services(self, services=settings.TH_SERVICES):
        
        kwargs = {}
        for class_path in services:
            module_name, class_name = class_path.rsplit('.', 1)
            klass = import_from_path(class_path)
            service = klass(None, **kwargs)
            self.register(class_name, service)
570801
public Object getService(String interfaceClassName, String serviceClassName, String versionRange, Dictionary<String,String> filter)
    {
        return ClassServiceUtility.getClassService().getClassFinder(context).getClassBundleService(interfaceClassName, serviceClassName, versionRange, filter, -1);
    }
146787
function getSetting()
    {
        $setting = $this->setting;

        if (is_string($setting)) {
            ## it is service
            if (!$this->services()->has($setting))
                throw new \InvalidArgumentException(sprintf(
                    'Service with name (%s) defined as Sapi Config but not found.'
                ));

            $services = $this->services();
            $setting  = $services->get($setting);
        }

        return $setting;
    }
184892
def get_settings(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/settings" % (service_id, version_number))
		return FastlySettings(self, content)
764519
def get_enabled():
    '''
    
    '''
    ret = set()
    for name in _iter_service_names():
        if _service_is_upstart(name):
            if _upstart_is_enabled(name):
                ret.add(name)
        else:
            if _service_is_sysv(name):
                if _sysv_is_enabled(name):
                    ret.add(name)
    return sorted(ret)
754952
function getService(name) {
    if (name.indexOf('.') >= 0) {
        name = utils.getCamelCase(name);
    }

    if (!name.match(/^.*Service$/)) {
        name += 'Service';
    }

    return cook(name);
}
504858
async def get_power_settings(self) -> List[Setting]:
        """"""
        return [
            Setting.make(**x)
            for x in await self.services["system"]["getPowerSettings"]({})
        ]
229456
def get(self, sid):
        
        return VariableContext(
            self._version,
            service_sid=self._solution['service_sid'],
            environment_sid=self._solution['environment_sid'],
            sid=sid,
        )
366963
def _GetServiceKey():
  """"""
  global _service_key

  if _service_key is None:
    hive = getattr(winreg, config.CONFIG["Client.config_hive"])
    path = config.CONFIG["Client.config_key"]

    # Don't use winreg.KEY_WOW64_64KEY since it breaks on Windows 2000
    _service_key = winreg.CreateKeyEx(hive, path, 0, winreg.KEY_ALL_ACCESS)

  return _service_key
541149
def get_services(self):
        """"""
        result = []
        nodes = self.root.iterfind(
            './/ns:service', namespaces={'ns': self.namespace})
        for node in nodes:
            result.append(FritzService(
                node.find(self.nodename('serviceType')).text,
                node.find(self.nodename('controlURL')).text,
                node.find(self.nodename('SCPDURL')).text))
        return result
477908
def _get_zone_id(self):
        
        if not self.service.exists():
            logging.warning("Service does not yet exist.")

        return self.service.settings.data['zone']['http-header-value']
1373466
def get_service():
    """"""
    global _SERVICE_MANAGER

    if _SERVICE_MANAGER is None:
        _SERVICE_MANAGER = driver.DriverManager(
            namespace='tvrenamer.data.services',
            name=cfg.CONF.lookup_service,
            invoke_on_load=True)
    return _SERVICE_MANAGER.driver
841712
public function fetch() {
        $params = Values::of(array());

        $payload = $this->version->fetch(
            'GET',
            $this->uri,
            $params
        );

        return new SettingsInstance($this->version, $payload);
    }
1360432
def get_configuration(self):
        
        mapping = {}
        settings = self.get_settings()
        for record in self.context.getAnalyses():
            uid = record.get("service_uid")
            setting = settings.get(uid, {})
            config = {
                "partition": record.get("partition"),
                "hidden": setting.get("hidden", False),
            }
            mapping[uid] = config
        return mapping
1170254
def service_action(self, service, action):
        ""
        try:
            service = api.get_cluster(self.cluster).get_service(service)
        except ApiException:
            print("Service not found")
            return None

        if action == "start":
            service.start()
        if action == "restart":
            service.restart()
        if action == "stop":
            service.stop()

        return True
677578
public function getService()
    {
        if (null === $this->service) {
            $class = explode('\\', get_class($this));
            $class = substr(end($class), 0, -10);
            $serviceKey = strtolower($this->getModuleNamespace() . '_' . $class . '_service');
            $this->setService($this->getServiceLocator()->get($serviceKey));
        }
        return $this->service;
    }
854436
def get_request_setting(self, service_id, version_number, name):
		""""""
		content = self._fetch("/service/%s/version/%d/request_settings/%s" % (service_id, version_number, name))
		return FastlyRequestSetting(self, content)