<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def retry_erroneous(self, properties_update):
 # type: (dict) -> int """ Removes the ERRONEOUS state from a component and retries a validation :param properties_update: A dictionary to update component properties :return: The new state of the component """

        with self._lock:
            if self.state != StoredInstance.ERRONEOUS:
                # Not in erroneous state: ignore
                return self.state

            # Update properties
            if properties_update:
                self.context.properties.update(properties_update)

            # Reset state
            self.state = StoredInstance.INVALID
            self.error_trace = None

            # Retry
            self.check_lifecycle()

            # Check if the component is still erroneous
            return self.state