original_string: private function init_youtube_service() {
          global $CFG;
  
          if (!isset($this->service)) {
              require_once($CFG->libdir . '/google/lib.php');
              $this->client = get_google_client();
              $this->client->setDeveloperKey($this->apikey);
              $this->client->setScopes(array(Google_Service_YouTube::YOUTUBE_READONLY));
              $this->service = new Google_Service_YouTube($this->client);
          }
      }
code: private function init_youtube_service() {
          global $CFG;
  
          if (!isset($this->service)) {
              require_once($CFG->libdir . '/google/lib.php');
              $this->client = get_google_client();
              $this->client->setDeveloperKey($this->apikey);
              $this->client->setScopes(array(Google_Service_YouTube::YOUTUBE_READONLY));
              $this->service = new Google_Service_YouTube($this->client);
          }
      }
code_tokens: private function init_youtube_service ( ) { global $ CFG ; if ( ! isset ( $ this -> service ) ) { require_once ( $ CFG -> libdir . '/google/lib.php' ) ; $ this -> client = get_google_client ( ) ; $ this -> client -> setDeveloperKey ( $ this -> apikey ) ; $ this -> client -> setScopes ( array ( Google_Service_YouTube :: YOUTUBE_READONLY ) ) ; $ this -> service = new Google_Service_YouTube ( $ this -> client ) ; } }
docstring: Init all the youtube client service stuff.
  
  Instead of instantiating the service in the constructor, we delay
  it until really neeed because it's really memory hungry (2MB). That
  way the editor or any other artifact requiring repository instantiation
  can do it in a cheap way. Sort of lazy loading the plugin.
docstring_tokens: Init all the youtube client service stuff .