code: def config_attributes(self):
          
  
          rtn = [('HiddenServiceDir', str(self.dir))]
          if self.conf._supports['HiddenServiceDirGroupReadable'] \
             and self.group_readable:
              rtn.append(('HiddenServiceDirGroupReadable', str(1)))
          for port in self.ports:
              rtn.append(('HiddenServicePort', str(port)))
          if self.version:
              rtn.append(('HiddenServiceVersion', str(self.version)))
          for authline in self.authorize_client:
              rtn.append(('HiddenServiceAuthorizeClient', str(authline)))
          return rtn
docs: Helper method used by TorConfig when generating a torrc file.