def snake_case_key(key: str) -> str:
    assert isinstance(key, str)
    new_key = key[0]
    for char in key[1:]:
        if char.isupper():
            new_key += "_{char}".format(char=char.lower())
        elif char == "-":
            new_key += "__"
        else:
            new_key += char
    return new_key

fbf0f8b27970d7bf7e8f93fcfe889cd1ec0cf794
<mask token>

def snake_case_key(key: str) ->str:
    assert isinstance(key, str)
    new_key = key[0]
    for char in key[1:]:
        if char.isupper():
            new_key += '_{char}'.format(char=char.lower())
        elif char == '-':
            new_key += '__'
        else:
            new_key += char
    return new_key

def snake_case_key(key: str) -> str:
    assert isinstance(key, str)
    new_key = key[0]
    for char in key[1:]:
        if char.isupper():
            new_key += "_{char}".format(char=char.lower())
        elif char == "-":
            new_key += "__"
        else:
            new_key += char
    return new_key
