code: def validate(self):
      try:
          if self.edit.text().trimmed():
              self.accept()
      except AttributeError:
          # PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
          if self.edit.text().strip():
              self.accept()
  
file_path: PaddleOCR/PPOCRLabel/libs/labelDialog.py
imports: from libs.utils import newIcon, labelValidator
label_desc: Use image node_id 2 for calling the LabelDialog obj's underlying member method code with example usage: obj.validate() without return types