code: public function session(SessionInterface $session = null) : SessionInterface
      {
          if ($session){
              $this->session = $session;
          }
          if (!$this->session){
              $this->session = new NullSession;
          }
          return $this->session;
      }
docs: Set/get session
  
  @param SessionInterface $session
  
  @return SessionInterface