code: def _validate(self):
          
          # disable methods matching before validation
          self._disable_patching = True
          # validation by Invariant.validate
          self._validate_base(self)
          # enable methods matching after validation
          self._disable_patching = False
docs: Step 5 (1st flow) or Step 4 (2nd flow). Process contract for object.