def type2str(ty: SimType | None) -> str:
    """
    Convert a SimType instance to a string that can be displayed.

    :param ty:      The SimType instance, or None if it's for void.
    :return:        A string.
    """

    if ty is None:
        return "void"
    if isinstance(ty, SimTypePointer):
        return f"{type2str(ty.pts_to)}*"
    if ty.label:
        return ty.label
    return repr(ty)

    Convert a SimType instance to a string that can be displayed.

    :param ty:      The SimType instance, or None if it's for void.
    :return:        A string.
    
angrmanagement/utils/func.py