import importlib


def get_suite_amount_of_workers(workspace, project, suite):
    """Get the amount of workers defined in a suite.
    Default is 1 if suite does not have workers defined"""
    amount = 1
    suite_module = importlib.import_module('projects.{0}.suites.{1}'.format(project, suite),
                                           package=None)
    if hasattr(suite_module, 'workers'):
        amount = suite_module.workers
    return amount