code: def get_extensions(self, data=False):
          
  
          ext_list = [key for key in
                      self.__dict__ if type(self.__dict__[key]) is Extension]
          for key in ext_list:
              if data:
                  yield getattr(self, key)
              else:
                  yield key
docs: Yields the extensions or their names
  
          Parameters
          ----------
          data : boolean, optional
             If True, returns a generator which yields the extensions.
             If False, returns a generator which yields the names of
             the extensions (default)
  
          Returns
          -------
          Generator for Extension or string