def _data_api():
 api_path = getattr(settings, 'ENROLLMENT_DATA_API', DEFAULT_DATA_API)
 try:
  return importlib.import_module(api_path)
 except (ImportError, ValueError):
  log.exception(u"Could not load module at '{path}'".format(path=api_path))
  raise errors.EnrollmentApiLoadError(api_path)

def _data_api ( ) : api_path = getattr ( settings , 'ENROLLMENT_DATA_API' , DEFAULT_DATA_API ) try : return importlib . import_module ( api_path ) except ( ImportError , ValueError ) : log . exception ( u"Could not load module at '{path}'" . format ( path = api_path ) ) raise errors . EnrollmentApiLoadError ( api_path )
returns a data api .