code: private function getImages(Variation $variation)
      {
          $images = [];
          foreach ($variation->getImages() as $image) {
              $shopIdentifiers = array_filter($image->getShopIdentifiers(), function ($shop) {
                  $identity = $this->identityService->findOneBy([
                      'objectIdentifier' => (string) $shop,
                      'objectType' => Shop::TYPE,
                      'adapterName' => ShopwareAdapter::NAME,
                  ]);
  
                  return $identity !== null;
              });
  
              if (empty($shopIdentifiers)) {
                  continue;
              }
  
              $imageIdentity = $this->identityService->findOneBy([
                  'objectIdentifier' => $image->getMediaIdentifier(),
                  'objectType' => Media::TYPE,
                  'adapterName' => ShopwareAdapter::NAME,
              ]);
  
              if (null === $imageIdentity) {
                  continue;
              }
  
              $images[] = [
                  'mediaId' => $imageIdentity->getAdapterIdentifier(),
                  'position' => $image->getPosition(),
              ];
          }
  
          return $images;
      }
docs: @param Variation $variation
  
  @return array