code: protected function getStockAdjustmentFromEvent(ResourceEventInterface $event)
      {
          $stockAdjustment = $event->getResource();
  
          if (!$stockAdjustment instanceof StockAdjustmentInterface) {
              throw new InvalidArgumentException("Expected instance of " . StockAdjustmentInterface::class);
          }
  
          return $stockAdjustment;
      }
docs: Returns the stock adjustment from the resource event.
  
  @param ResourceEventInterface $event
  
  @return StockAdjustmentInterface