Takes a group_name and finds any environments that have a SUPERNOVA_GROUP
    configuration line that matches the group_name.

def get_envs_in_group(group_name, nova_creds):
    """
    Takes a group_name and finds any environments that have a SUPERNOVA_GROUP
    configuration line that matches the group_name.
    """
    envs = []
    for key, value in nova_creds.items():
        supernova_groups = value.get('SUPERNOVA_GROUP', [])
        if hasattr(supernova_groups, 'startswith'):
            supernova_groups = [supernova_groups]
        if group_name in supernova_groups:
            envs.append(key)
        elif group_name == 'all':
            envs.append(key)
    return envs