code: def sext(self, width):
          
          width = operator.index(width)
          if width < self._width:
              raise ValueError('sign extending to a smaller width')
          return BinWord(width, self.to_sint(), trunc=True)
docs: Sign-extends a word to a larger width.  It is an error to specify
          a smaller width (use ``extract`` instead to crop off the extra bits).