docs: def _create_chord_entry(task_id, task_class, message_body, user_id):
      """
      Create and update status records for a new :py:class:`UserTaskMixin` in a Celery chord.
      """
      args = message_body['args']
      kwargs = message_body['kwargs']
      arguments_dict = task_class.arguments_as_dict(*args, **kwargs)
      name = task_class.generate_name(arguments_dict)
      total_steps = task_class.calculate_total_steps(arguments_dict)
      parent_name = kwargs.get('user_task_name', '')
      chord_data = message_body['chord']
      group_id = message_body['taskset']
      with transaction.atomic():
          group, created = UserTaskStatus.objects.get_or_create(
              task_id=group_id, defaults={'is_container': True, 'name': parent_name, 'task_class': 'celery.group',
                                          'total_steps': total_steps, 'user_id': user_id})
          if created:
              # Also create a status for the chord as a whole
              chord = UserTaskStatus.objects.create(
                  is_container=True, name=parent_name, task_class='celery.chord', task_id=str(uuid4()),
                  total_steps=total_steps, user_id=user_id)
              group.parent = chord
              group.save(update_fields={'parent', 'modified'})
          else:
              chord = None
              group.increment_total_steps(total_steps)
              if parent_name and not group.name:
                  group.set_name(parent_name)
          UserTaskStatus.objects.create(
              name=name, parent=group, task_class=task_class, task_id=task_id, total_steps=total_steps, user_id=user_id)
          # chord body task status
          if not created:
              # body being handled by another of the tasks in the header
              return
          task_id = chord_data['options']['task_id']
          body_task = chord_data['task']
          body_class = import_string(body_task).__class__
          if not issubclass(body_class, UserTaskMixin):
              return
          args = chord_data['args']
          kwargs = chord_data['kwargs']
          arguments_dict = body_class.arguments_as_dict(*args, **kwargs)
          name = body_class.generate_name(arguments_dict)
          total_steps = body_class.calculate_total_steps(arguments_dict)
          UserTaskStatus.objects.get_or_create(
              task_id=task_id, defaults={'name': name, 'parent': chord, 'task_class': body_task,
                                         'total_steps': total_steps, 'user_id': user_id})
          chord.increment_total_steps(total_steps)