code: def register(self, extensions):
          
          for ext in reversed(extensions):
              for name in ext.names:
                  try:
                      self._extensions[name].appendleft(ext)
                  except KeyError:
                      self._extensions[name] = deque([ext])
docs: Registers extensions.