code: public function canCreate(ContainerInterface $container, $requestedName)
      {
          // Load options config specifications the first time this method is called.
          if (null === $this->optionsConfig) {
              $mainConfig          = $container->get('config');
              $this->optionsConfig = isset($mainConfig['options']) ? $mainConfig['options'] : [];
          }
          return false !== $this->getOptionsConfig($requestedName);
      }
docs: Can the factory create an instance for the service?
  
  @param  ContainerInterface $container
  @param  string             $requestedName
  
  @return bool