original_string: private function getRecordsByHandle(array $records): array
      {
          $recordsByHandle = [];
          foreach ($records as $record) {
              $modelClass = get_class($record);
              $converter = Craft::$app->controller->module->getConverter($modelClass);
              $index = $converter->getRecordIndex($record);
              $recordsByHandle[$index] = $record;
          }
  
          return $recordsByHandle;
      }
code: private function getRecordsByHandle(array $records): array
      {
          $recordsByHandle = [];
          foreach ($records as $record) {
              $modelClass = get_class($record);
              $converter = Craft::$app->controller->module->getConverter($modelClass);
              $index = $converter->getRecordIndex($record);
              $recordsByHandle[$index] = $record;
          }
  
          return $recordsByHandle;
      }
code_tokens: private function getRecordsByHandle ( array $ records ) : array { $ recordsByHandle = [ ] ; foreach ( $ records as $ record ) { $ modelClass = get_class ( $ record ) ; $ converter = Craft :: $ app -> controller -> module -> getConverter ( $ modelClass ) ; $ index = $ converter -> getRecordIndex ( $ record ) ; $ recordsByHandle [ $ index ] = $ record ; } return $ recordsByHandle ; }
docstring: Get records by handle.
  
  @param array $records
  
  @return array
docstring_tokens: Get records by handle .