<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_processor(self, processor_instance: Processor, priority=0) -> None: """Add a Processor instance to the World. :param processor_instance: An instance of a Processor, subclassed from the Processor class :param priority: A higher number is processed first. """

        assert issubclass(processor_instance.__class__, Processor)
        processor_instance.priority = priority
        processor_instance.world = self
        self._processors.append(processor_instance)
        self._processors.sort(key=lambda proc: proc.priority, reverse=True)