protected function clearShipment(Shipment\ShipmentInterface $shipment)
    {
        if (empty($shipment->getTrackingNumber()) && !$shipment->hasLabels()) {
            return false;
        }

        $shipment->setTrackingNumber(null);

        foreach ($shipment->getLabels() as $label) {
            $shipment->removeLabel($label);
        }

        return true;
    }