code: def subdomain(self, index, value=None):
          
          if value is not None:
              subdomains = self.subdomains()
              subdomains[index] = value
              return URL._mutate(self, host='.'.join(subdomains))
          return self.subdomains()[index]
docs: Return a subdomain or set a new value and return a new :class:`URL`
          instance.
  
          :param integer index: 0-indexed subdomain
          :param string value: New subdomain