code: def input_generation(args, problems):
      with open(args.output, "w") as file:
          for problem in problems.values():
              new_input = {}
              task_id = problem["task_id"]
              print(f"generating inputs for {task_id} ...")
              # by default we do not include constraints in the prompt (code)
              code = problem["prompt"] + problem["canonical_solution"]
              # but we use c_code to include contract which checks input validity at execution time
              if args.dataset == "humaneval":
                  c_code = (
                      problem["prompt"]
                      + problem["contract"]
                      + problem["canonical_solution"]
                  )
              elif args.dataset == "mbpp":
                  c_code = problem[
                      "prompt"
                  ] + insert_contract_into_code(
                      entry_point=problem["entry_point"],
                      code=problem["canonical_solution"],
                      contract=problem["contract"],
                  )
  
              # first generate chatgpt
              input_gen = ChatGPTGen(
                  problem["base_input"],
                  problem["entry_point"],
                  c_code,
                  code,
              ).generate(args.chatgpt_len)
              # generate mutation next
  
              if input_gen is None or len(input_gen) == 0:
                  new_input["task_id"] = task_id
                  new_input["inputs"] = {}
                  file.write(
                      json.dumps(new_input, cls=SetEncoder) + "\n"
                  )
                  continue
  
              input_gen.extend(
                  TypedMutGen(
                      input_gen, problem["entry_point"], c_code
                  ).generate(args.mut_len)
              )
              print(f"generated {len(input_gen)} inputs")
              new_input["task_id"] = task_id
              if args.dataset == "mbpp":
                  new_input["inputs"] = mbpp_serialize_inputs(
                      task_id, input_gen
                  )
              new_input["inputs"] = input_gen
              file.write(json.dumps(new_input, cls=SetEncoder) + "\n")
  
file_path: evalplus/evalplus/inputgen.py
imports: import argparse
  import json
  import os
  from evalplus.data.mbpp import mbpp_serialize_inputs
  from evalplus.gen.chatgpt_gen import ChatGPTGen
  from evalplus.gen.type_mut import TypedMutGen
label_desc: Use image node_id 2 for calling a global function with example usage: input_generation(args, problems) without return types