code: def modeldef(model_name, model_data, src=None, dir=None):
      assert src or dir, "either src or dir is required"
      model_data = dict(model_data)
      model_data["model"] = model_name
      gf_data = [model_data]
      gf = guildfile.Guildfile(gf_data, src=src, dir=dir)
      return gf.default_model
  
file_path: guildai/guild/model_proxy.py
imports: import logging
  import guild
  from guild import guildfile
  from guild import model
  from guild import plugin
label_desc: Use image node_id 1 for calling a global function with example usage: modeldef(model_name, model_data, src, dir) and returns: gf