class_docstr:     This prompt format was inspired by the below data in fujiki/japanese_alpaca_data.
      ```
      {
          'instruction': 'この課題では、以下の選択肢から文の出典を特定する必要があります。
  
  出力は以下から選択してください：
  - 新聞
  - 教科書
  - オンライン記事
  - 百科事典',
          'input': '彼はローマの政治家であり哲学者であり、史上最も偉大な軍事指導者の一人と考えられています。',
          'output': '百科事典'
      }
      ```
      Reference:
      - data: https://huggingface.co/datasets/fujiki/japanese_alpaca_data
      - code: https://github.com/Stability-AI/gpt-neox/blob/c130a4edc1120dccec8f02a34eb60d3e8f484cd3/finetune/finetune_base_ja.py#LL118C23-L127C11
      
code: def doc_to_answering_text(self, doc):
      choices_and_contexts = []
      for choice, context in zip(doc["choices"], doc["contexts"]):
          if doc["gold"] == choice:
              # need gold choice
              choices_and_contexts.append((choice, context))
          elif len(choices_and_contexts) < 2:
              # and wrong choice
              choices_and_contexts.append((choice, context))
          if 1 < len(choices_and_contexts):
              # 1 gold and 1 wrong are enough
              break
      doc["choices"] = [tup[0] for tup in choices_and_contexts]
      doc["contexts"] = [tup[1] for tup in choices_and_contexts]
      choices = "\n".join([f"- {choice}" for choice in doc["choices"]])
      instruction_text = (
          self.INSTRUCTION + f"出力は以下から選択してください：\n{choices}"
      )
      combined_context = "\n".join(
          [
              context
              for context in self.batch_truncate_text(
                  doc["contexts"], self.ANSWERING_CONTEXT_LIMIT
              )
          ]
      )
      input_text = f"文脈：{combined_context}\n質問：{doc['goal']}"
      return (
          f"### 指示:\n{instruction_text}\n\n"
          f"### 入力:\n{input_text}\n\n"
          f"### 応答:\n"
      )
  
imports: import os
  import inspect
  import datasets
  from lm_eval.base import MultipleChoiceTask, rf
  import numpy
label_desc: Use image node_id 3 for calling the JAQKETV1WithJAAlpacaPrompt obj's underlying member method code with example usage: obj.doc_to_answering_text(doc) and returns: str, instruction_text, str, input_text, str