code: def convert_examples_to_features(item):
      example, example_index, tokenizer, args, stage = item
  
      if args.model_type in ["t5", "codet5"] and args.add_task_prefix:
          if args.sub_task != "none":
              source_str = "{} {}: {}".format(
                  args.task, args.sub_task, example.source
              )
          else:
              source_str = "{}: {}".format(args.task, example.source)
      else:
          source_str = example.source
  
      source_str = source_str.replace("</s>", "<unk>")
      source_ids = tokenizer.encode(
          source_str,
          max_length=args.max_source_length,
          padding="max_length",
          truncation=True,
      )
      assert source_ids.count(tokenizer.eos_token_id) == 1
      if stage == "test":
          target_ids = []
      else:
          target_str = example.target
          if args.add_lang_ids:
              target_str = add_lang_by_task(
                  example.target, args.task, args.sub_task
              )
          if args.task in ["defect", "clone"]:
              if target_str == 0:
                  target_str = "false"
              elif target_str == 1:
                  target_str = "true"
              else:
                  raise NameError
          target_str = target_str.replace("</s>", "<unk>")
          target_ids = tokenizer.encode(
              target_str,
              max_length=args.max_target_length,
              padding="max_length",
              truncation=True,
          )
          assert target_ids.count(tokenizer.eos_token_id) == 1
  
      return InputFeatures(
          example_index, source_ids, target_ids, url=example.url
      )
  
imports: import json
label_desc: Use image node_id 2 for calling a global function with example usage: convert_examples_to_features(item) and returns: InputFeatures