code: def default_nodegroup(cluster_config):
      partition = "aws"
      if "us-gov" in cluster_config["region"]:
          partition = "aws-us-gov"
      return {
          "iam": {
              "withAddonPolicies": {"autoScaler": True},
              "attachPolicyARNs": [
                  f"arn:{partition}:iam::aws:policy/AmazonEKSWorkerNodePolicy",
                  f"arn:{partition}:iam::aws:policy/AmazonEKS_CNI_Policy",
                  f"arn:{partition}:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
                  f"arn:{partition}:iam::aws:policy/ElasticLoadBalancingFullAccess",
                  cluster_config["cortex_policy_arn"],
              ]
              + cluster_config.get("iam_policy_arns", []),
          },
          "privateNetworking": cluster_config.get(
              "subnet_visibility", "public"
          )
          != "public",
          "kubeletExtraConfig": {
              "kubeReserved": {
                  "cpu": "150m",
                  "memory": "300Mi",
                  "ephemeral-storage": "1Gi",
              },
              "kubeReservedCgroup": "/kube-reserved",
              "systemReserved": {
                  "cpu": "150m",
                  "memory": "300Mi",
                  "ephemeral-storage": "1Gi",
              },
              "evictionHard": {
                  "memory.available": "200Mi",
                  "nodefs.available": "5%",
              },
              "registryPullQPS": 10,
          },
          "preBootstrapCommands": [
              "sudo yum install -y ipvsadm",
              "sudo modprobe ip_vs",  # IP virtual server
              "sudo modprobe ip_vs_rr",  # round robing load balancer
              "sudo modprobe ip_vs_lc",  # least connected load balancer
              "sudo modprobe ip_vs_wrr",  # weighted round robin load balancer
              "sudo modprobe ip_vs_sh",  # source-hashing load balancer
              "sudo modprobe nf_conntrack_ipv4",
          ],
          "overrideBootstrapCommand": "\n".join(
              [
                  "#!/bin/bash",
                  "source /var/lib/cloud/scripts/eksctl/bootstrap.helper.sh",
                  f"/etc/eks/bootstrap.sh {cluster_config['cluster_name']} --container-runtime dockerd --kubelet-extra-args \"--node-labels=${{NODE_LABELS}} --register-with-taints=${{NODE_TAINTS}}\"",
              ]
          ),
      }
  
imports: import json
  import click
  from collections import namedtuple
  import re
  import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: default_nodegroup(cluster_config) and returns: dict