def flatten_dict(d, parent_key='', sep='.'):
    """
    Flattens a nested dictionary and separates nested keys by sep.

    Args:
    - d (dict): Dictionary to flatten
    - parent_key (str, optional): Key to start with. Defaults to ''.
    - sep (str, optional): Separator to use. Defaults to '.'.

    Returns:
    dict: Flattened dictionary.
    """
    items = {}
    for k, v in d.items():
        new_key = f"{parent_key}{sep}{k}" if parent_key else k
        if isinstance(v, dict):
            items.update(flatten_dict(v, new_key, sep=sep))
        else:
            items[new_key] = v
    return items

    Flattens a nested dictionary and separates nested keys by sep.

    Args:
    - d (dict): Dictionary to flatten
    - parent_key (str, optional): Key to start with. Defaults to ''.
    - sep (str, optional): Separator to use. Defaults to '.'.

    Returns:
    dict: Flattened dictionary.
    
scripts/vespa_eks/vespa_cluster.py