def METHOD_NAME(self, jamf_url, category_name, priority, token, obj_id=0):
    """Update category metadata."""
    # build the object
    category_data = {"priority": int(priority), "name": category_name}
    self.output("Uploading category..")
    # if we find an object ID we put, if not, we post
    object_type = "category"
    if obj_id:
        url = "{}/{}/{}".format(jamf_url, self.api_endpoints(object_type), obj_id)
    else:
        url = "{}/{}".format(jamf_url, self.api_endpoints(object_type))
    # write the category.
    count = 0
    category_json = self.write_json_file(category_data)
    while True:
        count += 1
        self.output(
            f"Category upload attempt {count}",
            verbose_level=2,
        )
        request = "PUT" if obj_id else "POST"
        r = self.curl(request=request, url=url, token=token, data=category_json)
        # check HTTP response
        if self.status_check(r, "Category", category_name, request) == "break":
            break
        if count > 5:
            self.output("ERROR: Category creation did not succeed after 5 attempts")
            self.output(f"\nHTTP POST Response Code: {r.status_code}")
            raise ProcessorError("ERROR: Category upload failed ")
        if int(self.sleep) > 30:
            sleep(int(self.sleep))
        else:
            sleep(30)