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