def get_id_name(module, id_to_check):
    """Return the ID name if defined, otherwise return the numbered ID."""
    for name in module.symbol_name_to_id:
        if module.symbol_name_to_id[name] == id_to_check:
            return name
    return str(id_to_check)