original_string: public function getModelVersions($id)
      {
          $modelResult = $this->getRequest()->request(
              'GET',
              $this->getRequestUrl(sprintf('models/%s/versions', $id))
          );
  
          if (!isset($modelResult['model_versions'])) {
              throw new \Exception('Model Versions Not Found');
          }
  
          $modelVersions = [];
  
          foreach ($modelResult['model_versions'] as $version) {
              $modelVersion = new ModelVersion($version);
              $modelVersions[] = $modelVersion;
          }
  
          return $modelVersions;
      }
code: public function getModelVersions($id)
      {
          $modelResult = $this->getRequest()->request(
              'GET',
              $this->getRequestUrl(sprintf('models/%s/versions', $id))
          );
  
          if (!isset($modelResult['model_versions'])) {
              throw new \Exception('Model Versions Not Found');
          }
  
          $modelVersions = [];
  
          foreach ($modelResult['model_versions'] as $version) {
              $modelVersion = new ModelVersion($version);
              $modelVersions[] = $modelVersion;
          }
  
          return $modelVersions;
      }
code_tokens: public function getModelVersions ( $ id ) { $ modelResult = $ this -> getRequest ( ) -> request ( 'GET' , $ this -> getRequestUrl ( sprintf ( 'models/%s/versions' , $ id ) ) ) ; if ( ! isset ( $ modelResult [ 'model_versions' ] ) ) { throw new \ Exception ( 'Model Versions Not Found' ) ; } $ modelVersions = [ ] ; foreach ( $ modelResult [ 'model_versions' ] as $ version ) { $ modelVersion = new ModelVersion ( $ version ) ; $ modelVersions [ ] = $ modelVersion ; } return $ modelVersions ; }
docstring: Gets Model Versions
  
  @param $id
  
  @return array
  
  @throws \Exception
docstring_tokens: Gets Model Versions