from typing import Dict
from typing import Any


def create_gyre_prefix(gyre_comb: Dict[str, Any]) -> str:
    """
    Creates a GYRE run prefix to use for the given combination of GYRE
    parameter values. These prefixes should be unique within one MESA run, but
    can be repeated across multiple, separate, MESA runs.

    This also needs to be deterministic, reguardless of the fact that the dict
    passed in is unordered.

    >>> create_gyre_prefix({"a": 2, "c": 3, "b": "hi"})
    'gyre_a_2__b_hi__c_3__'
    """
    name = "gyre_"
    for key in sorted(gyre_comb.keys()):
        name += key + "_" + str(gyre_comb[key]) + "__"

    return name