code: def create_infilling_prompt(
      model_key: str,
      prefix: str,
      suffix: str,
      tokenizer: PreTrainedTokenizer | None = None,
  ) -> str:
      """TODO: how to separate magicoder from the others (magicoder now has a base
      model key. Consider change it?)"""
      if model_key in SupportedModelKeys.starcoder_based_models():
          return form_starcoder_infill(prefix, suffix)
      elif (
          model_key in SupportedModelKeys.codellama_based_models()
          and not "python" in model_key.lower()
      ):
          return form_codellama_infill(prefix, suffix)
      elif model_key in SupportedModelKeys.deepseekcoder_based_models():
          assert tokenizer is not None
          return form_deepseekcoder_infill(tokenizer, prefix, suffix)
  
      # TODO: other models
      assert False, f"Unsupported model key: {model_key}"
  
imports: from dataclasses import dataclass, field
  from enum import Enum
  from typing import Callable, Literal
  import torch
  from transformers import AutoModelForCausalLM, AutoTokenizer
  from transformers import GenerationConfig
  from transformers import PreTrainedModel, PreTrainedTokenizer
label_desc: Use image node_id 6 for calling a global function with example usage: create_infilling_prompt(model_key, prefix, suffix, tokenizer) and returns: form_starcoder_infill, form_codellama_infill, form_deepseekcoder_infill