
__all__ = ['Service', 'ServiceState',
           'audit_service', 'index_service', 'activity_service', 'auth_service']

from .base import Service, ServiceState

# Homegrown extensions.
from .audit import audit_service
from .indexing import service as index_service
from .conversion import converter

from .activity import ActivityService
activity_service = ActivityService()

from .auth import AuthService
auth_service = AuthService()


from flask import current_app

from .base import Service, ServiceState

# Homegrown extensions.
from .audit import audit_service
from .indexing import service as index_service
from .conversion import converter
from .activity import ActivityService
from .auth import AuthService

__all__ = ['Service', 'ServiceState', 'get_service',
           'audit_service', 'index_service', 'activity_service', 'auth_service']

auth_service = AuthService()
activity_service = ActivityService()


def get_service(service):
  return current_app.services.get(service)

Add a get_service convenience method.
Add a get_service convenience method.

  
+ from flask import current_app
- __all__ = ['Service', 'ServiceState',
-            'audit_service', 'index_service', 'activity_service', 'auth_service']
  
  from .base import Service, ServiceState
  
  # Homegrown extensions.
  from .audit import audit_service
  from .indexing import service as index_service
  from .conversion import converter
+ from .activity import ActivityService
+ from .auth import AuthService
  
- from .activity import ActivityService
+ __all__ = ['Service', 'ServiceState', 'get_service',
+            'audit_service', 'index_service', 'activity_service', 'auth_service']
+ 
+ auth_service = AuthService()
  activity_service = ActivityService()
  
- from .auth import AuthService
- auth_service = AuthService()
  
+ def get_service(service):
+   return current_app.services.get(service)
+ 
Add a get_service convenience method.
## Code Before:

__all__ = ['Service', 'ServiceState',
           'audit_service', 'index_service', 'activity_service', 'auth_service']

from .base import Service, ServiceState

# Homegrown extensions.
from .audit import audit_service
from .indexing import service as index_service
from .conversion import converter

from .activity import ActivityService
activity_service = ActivityService()

from .auth import AuthService
auth_service = AuthService()

## Instruction:
Add a get_service convenience method.
## Code After:

from flask import current_app

from .base import Service, ServiceState

# Homegrown extensions.
from .audit import audit_service
from .indexing import service as index_service
from .conversion import converter
from .activity import ActivityService
from .auth import AuthService

__all__ = ['Service', 'ServiceState', 'get_service',
           'audit_service', 'index_service', 'activity_service', 'auth_service']

auth_service = AuthService()
activity_service = ActivityService()


def get_service(service):
  return current_app.services.get(service)
