<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reprioritize(self, priority, element):
 """Updates the priority of an element. :raises: ValueError -- No such element in the priority queue. """

        if element not in self.element_finder:
            raise ValueError("No such element in the priority queue.")
        entry = self.element_finder[element]
        self.add_element(priority, element, entry[1])
        entry[1] = self.INVALID