code: def main(template, data=None, **kwargs):
      with io.open(template, "r", encoding="utf-8") as template_file:
          yaml_loader = kwargs.pop("yaml_loader", None) or "SafeLoader"
  
          if data is not None:
              with io.open(data, "r", encoding="utf-8") as data_file:
                  data = _load_data(data_file, yaml_loader)
          else:
              data = {}
  
          args = {"template": template_file, "data": data}
  
          args.update(kwargs)
          return render(**args)
  
imports: import io
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: main(template, data) and returns: render