class_docstr: prompt format was inspired by [日本語に特化した60億パラメータ規模のGPTモデルの構築と評価](https://www.anlp.jp/proceedings/annual_meeting/2023/pdf_dir/H9-4.pdf)
code: def preprocess_ctx(self, ctx, max_length):
      # if ctx fits in max length, return
      if len(self.tokenizer.encode(ctx)) <= max_length:
          return ctx
  
      # if ctx is too long, split on a tag that separates each example
      description, remainder = ctx.split(self.FEWSHOT_SEP, 1)
      ctxs = remainder.split(self.FEWSHOT_SEP)
  
      # if there is no example and still the prompt is too long, fail
      if len(ctxs) < 2:
          raise ValueError(
              f"0-shot description+example doesn't fit in max length. ctx: {ctx}"
          )
  
      # delete the first example, last is questioning example
      del ctxs[0]
  
      # recurse
      return self.preprocess_ctx(
          self.FEWSHOT_SEP.join([description, *ctxs]), max_length
      )
  
imports: import os
  import inspect
  import datasets
  from lm_eval.base import MultipleChoiceTask, rf
  import numpy
label_desc: Use image node_id 14 for calling the JAQKETV1 obj's underlying member method code with example usage: obj.preprocess_ctx(ctx, max_length) and returns: self, ctx