def _get_referenced_services(specs):
active_services = set()<EOL>for app_spec in specs['<STR_LIT>'].values():<EOL><INDENT>for service in app_spec['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>active_services.add(service)<EOL><DEDENT><DEDENT>for bundle_spec in specs['<STR_LIT>'].values():<EOL><INDENT>for service in bundle_spec['<STR_LIT>']:<EOL><INDENT>active_services.add(service)<EOL><DEDENT><DEDENT>return active_services<EOL>
Returns all services that are referenced in specs.apps.depends.services,
or in specs.bundles.services