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