code: public function getTheme($identifier)
      {
          $themes = $this->getAvailableThemes();
          if ( !isset($themes[$identifier]) ) {
              $themeIds = array();
              foreach ($themes as $key => $value) {
                  $themeIds[] = $key;
              }
              throw new \Exception(sprintf('Theme "%s" does not exist. Possible values are [%s]', $identifier, implode(', ', $themeIds)), 1);
          }
          return $themes[$identifier];
      }
docs: Gets a Theme by its identifier
  
  @param string $identifier Theme identifier
  
  @return Theme