Create helper for data generation
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=250622)
</details>
<!--IssueSummary end-->
Changes will need to be applied to `assignee` and `reviewer`
---
The following discussion from !40424 should be addressed:
- [ ] @wortschi started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40424#note_412886661): (+3 comments)
> I wonder if it would be better to move this `data` generation into a helper :thinking: . But maybe ~backend has a strong opinion about this?
issue