code: public function extract($object)
      {
          if (!$object instanceof ImageSet || !($image = $object->get(ImageSetInterface::ORIGINAL))) {
              return [];
          }
  
          return [$this->options->getFormElementName() => $image->getId()];
      }
docs: Extract values from an object
  
  @param object $object
  
  @return array