def METHOD_NAME(self, lbar, rbar):
    signals = [
        sig
        for sig in self.signals_text_items[lbar:rbar]
        if isinstance(sig, CenteredTextItem)
    ]
    if len(signals) <= 50:
        for sig in signals:
            sig.show()
    else:
        for sig in signals:
            sig.hide()