original_string: public function get_context_ids_for_author_ids(array $authorids) : array {
          $db = $this->get_db();
          [$insql, $params] = $db->get_in_or_equal($authorids);
          $sql = "SELECT instanceid, id FROM {context} WHERE contextlevel = ? AND instanceid {$insql}";
          $records = $db->get_records_sql($sql, array_merge([CONTEXT_USER], $params));
          return array_reduce($authorids, function($carry, $id) use ($records) {
              $carry[$id] = isset($records[$id]) ? (int) $records[$id]->id : null;
              return $carry;
          }, []);
      }
code: public function get_context_ids_for_author_ids(array $authorids) : array {
          $db = $this->get_db();
          [$insql, $params] = $db->get_in_or_equal($authorids);
          $sql = "SELECT instanceid, id FROM {context} WHERE contextlevel = ? AND instanceid {$insql}";
          $records = $db->get_records_sql($sql, array_merge([CONTEXT_USER], $params));
          return array_reduce($authorids, function($carry, $id) use ($records) {
              $carry[$id] = isset($records[$id]) ? (int) $records[$id]->id : null;
              return $carry;
          }, []);
      }
code_tokens: public function get_context_ids_for_author_ids ( array $ authorids ) : array { $ db = $ this -> get_db ( ) ; [ $ insql , $ params ] = $ db -> get_in_or_equal ( $ authorids ) ; $ sql = "SELECT instanceid, id FROM {context} WHERE contextlevel = ? AND instanceid {$insql}" ; $ records = $ db -> get_records_sql ( $ sql , array_merge ( [ CONTEXT_USER ] , $ params ) ) ; return array_reduce ( $ authorids , function ( $ carry , $ id ) use ( $ records ) { $ carry [ $ id ] = isset ( $ records [ $ id ] ) ? ( int ) $ records [ $ id ] -> id : null ; return $ carry ; } , [ ] ) ; }
docstring: Get the context ids for a set of author ids. The results are indexed
  by the author id.
  
  @param int[] $authorids The list of author ids to fetch.
  @return int[] Results indexed by author id.
docstring_tokens: Get the context ids for a set of author ids . The results are indexed by the author id .