original_string: public function updateModelConcepts(array $modelsArray, $action)
      {
          $data['models'] = [];
  
          foreach ($modelsArray as $modelId => $modelConcepts) {
              $model = [];
              $model['id'] = (string)$modelId;
              $model['output_info'] = [];
              $model['output_info']['data'] = [];
              $model['output_info']['data'] = $this->addModelConcepts($model['output_info']['data'], $modelConcepts);
  
              $data['models'][] = $model;
          }
          $data['action'] = $action;
  
          $updateResult = $this->getRequest()->request(
              'PATCH',
              $this->getRequestUrl('models'),
              $data
          );
  
          return $this->getModelsFromResult($updateResult);
      }
code: public function updateModelConcepts(array $modelsArray, $action)
      {
          $data['models'] = [];
  
          foreach ($modelsArray as $modelId => $modelConcepts) {
              $model = [];
              $model['id'] = (string)$modelId;
              $model['output_info'] = [];
              $model['output_info']['data'] = [];
              $model['output_info']['data'] = $this->addModelConcepts($model['output_info']['data'], $modelConcepts);
  
              $data['models'][] = $model;
          }
          $data['action'] = $action;
  
          $updateResult = $this->getRequest()->request(
              'PATCH',
              $this->getRequestUrl('models'),
              $data
          );
  
          return $this->getModelsFromResult($updateResult);
      }
code_tokens: public function updateModelConcepts ( array $ modelsArray , $ action ) { $ data [ 'models' ] = [ ] ; foreach ( $ modelsArray as $ modelId => $ modelConcepts ) { $ model = [ ] ; $ model [ 'id' ] = ( string ) $ modelId ; $ model [ 'output_info' ] = [ ] ; $ model [ 'output_info' ] [ 'data' ] = [ ] ; $ model [ 'output_info' ] [ 'data' ] = $ this -> addModelConcepts ( $ model [ 'output_info' ] [ 'data' ] , $ modelConcepts ) ; $ data [ 'models' ] [ ] = $ model ; } $ data [ 'action' ] = $ action ; $ updateResult = $ this -> getRequest ( ) -> request ( 'PATCH' , $ this -> getRequestUrl ( 'models' ) , $ data ) ; return $ this -> getModelsFromResult ( $ updateResult ) ; }
docstring: Common Model's Concepts Update Method
  
  @param  array $modelsArray
  @param $action
  
  @return array
docstring_tokens: Common Model s Concepts Update Method