code: def edit(self, resource):
          
          schema = TagSchema(only=('name', 'configs', 'devices', 'packages', 'results'))
          json = self.service.encode(schema, resource)
  
          schema = TagSchema()
          resp = self.service.edit(self.base, resource.name, json)
          return self.service.decode(schema, resp)
docs: Edit a tag.
  
          :param resource: :class:`tags.Tag <tags.Tag>` object
          :return: :class:`tags.Tag <tags.Tag>` object
          :rtype: tags.Tag