original_string: public function execute(array $records) : array {
          return array_map(function($record) {
              $contextid = $record->ctxid;
              context_helper::preload_from_record($record);
              $context = context::instance_by_id($contextid);
              return $context;
          }, $records);
      }
code: public function execute(array $records) : array {
          return array_map(function($record) {
              $contextid = $record->ctxid;
              context_helper::preload_from_record($record);
              $context = context::instance_by_id($contextid);
              return $context;
          }, $records);
      }
code_tokens: public function execute ( array $ records ) : array { return array_map ( function ( $ record ) { $ contextid = $ record -> ctxid ; context_helper :: preload_from_record ( $ record ) ; $ context = context :: instance_by_id ( $ contextid ) ; return $ context ; } , $ records ) ; }
docstring: Extract the contexts from a list of records.
  
  @param stdClass[] $records The list of records which have context properties
  @return context[] List of contexts matching the records.
docstring_tokens: Extract the contexts from a list of records .