code: def _get_or_create_group_parent(message_body, user_id):
      
      parent_id = message_body.get('taskset', None)
      if not parent_id:
          # Not part of a group
          return None
      parent_class = 'celery.group'
      parent_name = message_body['kwargs'].get('user_task_name', '')
      parent, _ = UserTaskStatus.objects.get_or_create(
          task_id=parent_id, defaults={'is_container': True, 'name': parent_name, 'task_class': parent_class,
                                       'total_steps': 0, 'user_id': user_id})
      if parent_name and not parent.name:
          parent.name = parent_name
          parent.save(update_fields={'name', 'modified'})
      return parent
docs: Determine if the given task belongs to a group or not, and if so, get or create a status record for the group.
  
      Arguments:
          message_body (dict): The body of the before_task_publish signal for the task in question
          user_id (int): The primary key of the user model record for the user who triggered the task.
                         (If using a custom user model, this may not be an integer.)
  
      Returns
      -------
          UserTaskStatus: The status record for the containing group, or `None` if there isn't one