def METHOD_NAME(client, cluster_name, num_nodegroups, minimal):
    """
    Generates 'num_nodegroups' number of nodegroups with randomized data and adds them to the mocked backend.
    If 'minimal' is True, only the required values are generated; if False, all values are generated.
    Returns a list of the names of the generated nodegroups.
    """
    return [
        client.create_nodegroup(
            nodegroupName=generate_random_name(),
            clusterName=cluster_name,
            **_input_builder(NodegroupInputs, minimal),
        )[ResponseAttributes.NODEGROUP][NodegroupAttributes.NODEGROUP_NAME]
        for _ in range(num_nodegroups)
    ]