code: def data_gen_for_mcq():
      # multiple choice question data gen
      # Generated from following code snippet
      #
      # tokenizer = transformers.BertTokenizer.from_pretrained("bert-base-uncased")
      # prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
      # choice0 = "It is eaten with a fork and a knife."
      # choice1 = "It is eaten while held in the hand."
      # data = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
      # data = {k: v.unsqueeze(0) for k, v in encoding.items()}
      # data['labels'] = torch.tensor([0], dtype=torch.int64)
      input_ids = torch.tensor(
          [
              [
                  [
                      101,
                      1999,
                      3304,
                      1010,
                      10733,
                      2366,
                      1999,
                      5337,
                      10906,
                      1010,
                      2107,
                      2004,
                      2012,
                      1037,
                      4825,
                      1010,
                      2003,
                      3591,
                      4895,
                      14540,
                      6610,
                      2094,
                      1012,
                      102,
                      2009,
                      2003,
                      8828,
                      2007,
                      1037,
                      9292,
                      1998,
                      1037,
                      5442,
                      1012,
                      102,
                      102,
                      5442,
                      1012,
                      102,
                      102,
                  ],
                  [
                      101,
                      1999,
                      3304,
                      1010,
                      10733,
                      2366,
                      1999,
                      5337,
                      10906,
                      1010,
                      2107,
                      2004,
                      2012,
                      1037,
                      4825,
                      1010,
                      2003,
                      3591,
                      4895,
                      14540,
                      6610,
                      2094,
                      1012,
                      102,
                      2009,
                      2003,
                      8828,
                      2096,
                      2218,
                      1999,
                      1996,
                      2192,
                      1012,
                      102,
                      0,
                      0,
                      1012,
                      102,
                      0,
                      0,
                  ],
              ]
          ]
      )
      token_type_ids = torch.tensor(
          [
              [
                  [
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                  ],
                  [
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      0,
                      0,
                      1,
                      1,
                      0,
                      0,
                  ],
              ]
          ]
      )
      attention_mask = torch.tensor(
          [
              [
                  [
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                  ],
                  [
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      0,
                      0,
                      1,
                      1,
                      0,
                      0,
                  ],
              ]
          ]
      )
      labels = torch.tensor([0], dtype=torch.int64)
  
      return dict(
          input_ids=input_ids,
          token_type_ids=token_type_ids,
          attention_mask=attention_mask,
          labels=labels,
      )
  
file_path: colossalai/tests/kit/model_zoo/transformers/bert.py
imports: import torch
  import transformers
  from ..registry import ModelAttribute, model_zoo
label_desc: Use image node_id 6 for calling a global function with example usage: data_gen_for_mcq() and returns: dict