code: def _index_template_readme(dir):
      assert os.path.isdir(dir), dir
      path = os.path.join(dir, "README.md")
      if not os.path.exists(path):
          cli.error(f"index template '{dir}' is missing README.md")
      return path
  
file_path: guildai/guild/commands/publish_impl.py
imports: import os
  from guild import batch_util
  from guild import cli
  from guild import config
  from guild import publish
  from guild import util
  from .None import runs_impl
label_desc: Use image node_id 6 for calling a global function with example usage: _index_template_readme(dir) and returns: path