code: protected function loadSessionHandler($sessionHandler, $params)
      {
          if ($sessionHandler instanceof HandlerInterface) {
              $newSessionHandler = $sessionHandler;
          } else {
              $newSessionHandler = HandlerFactory::createHandler($params);
          }
  
          return $newSessionHandler;
      }
docs: Load the session handler
  
  Either load the provided session handler or create one depending on incoming parameters.
  
  @param HandlerInterface|null $sessionHandler
  @param Params\SessionHandlerParams|null $params
  @return HandlerInterface