class_docstr: prompt template is taken from [ChatGPT vs BERT: どちらが日本語をより理解できるのか?](https://fintan.jp/page/9126/)
class_docstr_tok: ["prompt","template","is","taken","from","[","ChatGPT","vs","BERT",":","\u3069\u3061\u3089\u304c\u65e5\u672c\u8a9e\u3092\u3088\u308a\u7406\u89e3\u3067\u304d\u308b\u306e\u304b","?","]","(","https",":","\/\/fintan.jp\/page\/9126\/",")"]
docstr: TODO: move this to `MultipleChoiceTask`.
  Directly implementing this in `MultipleChoiceTask` will break the task versioning
  as the metric definition will get updated, and thus we need to incrementally apply this to all
  tasks that inherit `MultipleChoiceTask` AND bump their task `VERSION`, and
  only after all tasks have been updated, then we can move this to `MultipleChoiceTask`.
docstr_tok: ["TODO",":","move","this","to","`","MultipleChoiceTask","`",".","Directly","implementing","this","in","`","MultipleChoiceTask","`","will","break","the","task","versioning","as","the","metric","definition","will","get","updated",",","and","thus","we","need","to","incrementally","apply","this","to","all","tasks","that","inherit","`","MultipleChoiceTask","`","AND","bump","their","task","`","VERSION","`",",","and","only","after","all","tasks","have","been","updated",",","then","we","can","move","this","to","`","MultipleChoiceTask","`","."]
code: def fewshot_context(
      self,
      doc,
      num_fewshot,
      provide_description=None,
      rnd=None,
      description=None,
      stratified=False,
  ):
      """
      TODO: move this to `MultipleChoiceTask`.
      Directly implementing this in `MultipleChoiceTask` will break the task versioning
      as the metric definition will get updated, and thus we need to incrementally apply this to all
      tasks that inherit `MultipleChoiceTask` AND bump their task `VERSION`, and
      only after all tasks have been updated, then we can move this to `MultipleChoiceTask`.
      """
      # Use stratified sampling
      return super().fewshot_context(
          doc,
          num_fewshot,
          provide_description,
          rnd,
          description,
          stratified=True,
      )
  
imports: import os
  from lm_eval.base import BalancedMultipleChoiceTask, rf
label_desc: Use image node_id 10 for calling the JNLIWithFintanPrompt obj's underlying member method code with example usage: obj.fewshot_context(doc, num_fewshot, provide_description, rnd, description, stratified) and returns: super