code: public function load(string $class, array $options = [])
      {
          /** @var LoaderInterface $loader */
          $loader = $this->loaders->get($class);
          $options = $this->resolveOptions($loader, $options);
          $element = $loader->load($options, $this, $this->payCollection);
  
          if (!$element instanceof $class) {
              throw new \UnexpectedValueException(sprintf(
                  'Loaded element is expected to be an instance of "%s".',
                  $class
              ));
          }
  
          return $element;
      }
docs: {@inheritdoc}