code: def is_nonempty(self):
          
          if len(self._subject) == 0:
              raise self._error_factory(_format("Expected {} to be non-empty", self._subject))
          return ChainInspector(self._subject)
docs: Ensures :attr:`subject` has non-zero length.