code: protected function getSupplierDeliveryFromEvent(ResourceEventInterface $event)
      {
          $delivery = $event->getResource();
  
          if (!$delivery instanceof SupplierDeliveryInterface) {
              throw new Exception\InvalidArgumentException("Expected instance of SupplierDeliveryInterface.");
          }
  
          return $delivery;
      }
docs: Returns the supplier delivery item from the event.
  
  @param ResourceEventInterface $event
  
  @return SupplierDeliveryInterface
  @throws Exception\InvalidArgumentException