def METHOD_NAME(model: QAbstractItemModel, obj: ItemType) -> QModelIndex:
    """Find the `QModelIndex` for a given object in the model."""
    fl = Qt.MatchFlag.MatchExactly | Qt.MatchFlag.MatchRecursive
    hits = model.match(
        model.index(0, 0, QModelIndex()),
        Qt.ItemDataRole.UserRole,
        obj,
        hits=1,
        flags=fl,
    )
    return hits[0] if hits else QModelIndex()