code: def get_nodegroup_config_by_name(
      cluster_config: dict, ng_name: str
  ) -> dict:
      """
      Gets a nodegroup in Cortex-dict format from Cortex cluster config.
      """
      for ng in cluster_config["node_groups"]:
          if ng["name"] == ng_name:
              return ng
  
imports: import json
  import click
  from collections import namedtuple
  import re
  import yaml
label_desc: Use image node_id 15 for calling a global function with example usage: get_nodegroup_config_by_name(cluster_config, ng_name) and returns: ng