code: protected function hasLabelData(Shipment\ShipmentInterface $shipment)
      {
          if ($shipment->hasParcels()) {
              foreach ($shipment->getParcels() as $parcel) {
                  if (!$parcel->hasLabels()) {
                      return false;
                  }
              }
  
              return true;
          }
  
          return $shipment->hasLabels();
      }
docs: Returns whether the shipment (or its parcels) has label(s) data.
  
  @param Shipment\ShipmentInterface $shipment
  
  @return bool Whether the given shipment has label data.