from typing import Dict
from typing import Any


def make_group_name(labels: Dict[str, Any]) -> str:
    """Create a name for a group by assembling labels.

    Different labels are separated by & while label and values are separated by ::
    Floating points number are formatted using g to avoid rounding issue to lead
    different groups.

    """
    fmt = ""
    for name in sorted(labels):
        if isinstance(labels[name], float):
            fmt += f"{name}::{labels[name]:g}"
        else:
            fmt += f"{name}::{labels[name]}"
        fmt += "&"
    # Strip the extra & from the name
    return fmt[:-1]