code: def _set_labels(node, apiserver_url, labels):
      '''Replace labels dict by a new one'''
      # Prepare URL
      url = "{0}/api/v1/nodes/{1}".format(apiserver_url, node)
      # Prepare data
      data = [{"op": "replace", "path": "/metadata/labels", "value": labels}]
      # Make request
      ret = _kpatch(url, data)
      if ret.get("status") == 404:
          return "Node {0} doesn't exist".format(node)
      return ref _set_labels(node, apiserver_url, labels):
      '''Replace labels dict by a new one'''
      # Prepare URL
      url = "{0}/api/v1/nodes/{1}".format(apiserver_url, node)
      # Prepare data
      data = [{"op": "replace", "path": "/metadata/labels", "value": labels}]
      # Make request
      ret = _kpatch(url, data)
      if ret.get("status") == 404:
          return "Node {0} doesn't exist".format(node)
      return ret
docs: Replace labels dict by a new one