Sets a new partition lease to be processed by the pump.

        :param lease: The lease to set.
        :type lease: ~azure.eventprocessorhost.lease.Lease

def set_lease(self, new_lease):
        """
        Sets a new partition lease to be processed by the pump.

        :param lease: The lease to set.
        :type lease: ~azure.eventprocessorhost.lease.Lease
        """
        if self.partition_context:
            self.partition_context.lease = new_lease
            self.partition_context.event_processor_context = new_lease.event_processor_context