code: def _replace_param_refs(s, params, meta, dir_name):
      for name, meta_param in meta.get("params", {}).items():
          val = params.get(name, meta_param.get("default", ""))
          if val == "${DIR_NAME}":
              val = dir_name
          s = s.replace("{{{{{name}}}}}", val)
      return s
  
imports: import errno
  import logging
  import os
  from guild import guildfile
  from guild import util
label_desc: Use image node_id 10 for calling a global function with example usage: _replace_param_refs(s, params, meta, dir_name) and returns: s