code: def install(self, opener):
          # type: (Union[Type[Opener], Opener, Callable[[], Opener]]) -> None
          
          _opener = opener if isinstance(opener, Opener) else opener()
          assert isinstance(_opener, Opener), "Opener instance required"
          assert _opener.protocols, "must list one or more protocols"
          for protocol in _opener.protocols:
              self._protocols[protocol] = _opener
          return opener
docs: Install an opener.
  
          Arguments:
              opener (`Opener`): an `Opener` instance, or a callable that
                  returns an opener instance.
  
          Note:
              May be used as a class decorator. For example::
                  registry = Registry()
                  @registry.install
                  class ArchiveOpener(Opener):
                      protocols = ['zip', 'tar']