def key_name(name):
    name = attr_name(name)

    if name.endswith("_"):
        return name[:-1]

    return name
Converts the input attribute name `name` into a key to be
dataset/ETHPy150Open STIXProject/python-stix/stix/utils/__init__.py/key_name