code: def _iter_service_instances(
      node_role: NodeRole,
      config: Dict,
      address: str = None,
      reverse: bool = False,
  ) -> Iterable[List[AbstractService]]:
      modules = _normalize_modules(config.get("modules"))
      service_names = config["services"]
      if reverse:
          service_names = service_names[::-1]
  
      svc_entries_list, _ = _find_service_entries(
          node_role, service_names, modules
      )
      for entries in svc_entries_list:
          yield [
              svc_entry.get_instance(address, config)
              for svc_entry in entries
          ]
  
file_path: mars/mars/services/core.py
imports: import abc
  import asyncio
  import enum
  import importlib
  import inspect
  import warnings
  from typing import Dict, Iterable, List, Union
label_desc: Use image node_id 3 for calling a global function with example usage: _iter_service_instances(node_role, config, address, reverse) without return types