def load(workflow_version):
    for user_data in USERS:
        # Create the user/worker objects and set the password.
        username = user_data.pop('username')
        password = user_data.pop('password')
        certifications = user_data.pop('certifications')
        user, _ = User.objects.update_or_create(
            username=username,
            defaults=user_data,
        )
        user.set_password(password)
        user.save()
        worker, _ = Worker.objects.update_or_create(user=user)

        # Grant the worker the desired certifications.
        for certification_slug, certification_role in certifications:
            certification = Certification.objects.get(
                slug=certification_slug)
            WorkerCertification.objects.update_or_create(
                certification=certification,
                worker=worker,
                task_class=WorkerCertification.TaskClass.REAL,
                role=certification_role)
Loads workers for running the journalism workflow.
dataset/ETHPy150Open unlimitedlabs/orchestra/journalism_workflow/load_sample_data.py/load