code: def retrieve_width(self, signum=None, frame=None):
          
          for method_name, args in self.strategies:
              method = getattr(self, "from_" + method_name)
              width = method(*args)
              if width and width > 0:
                  self.width = width
                  break # Found!
          os.environ["COLUMNS"] = str(self.width)
docs: Stores the terminal width into ``self.width``, if possible.
          This function is also the SIGWINCH event handler.