code: private function getFormFactory(ContainerInterface $services)
      {
          $elements = null;
  
          if ($services->has('FormElementManager')) {
              $elements = $services->get('FormElementManager');
          }
  
          return new Factory($elements);
      }
docs: Retrieve the form factory
  
  @param  ContainerInterface $services
  @return Factory