code: def _encode_function(flagdef, val):
      assert flagdef.min is not None and flagdef.max is not None
      func_name = flagdef.distribution or "uniform"
      low = flag_util.encode_flag_val(flagdef.min)
      high = flag_util.encode_flag_val(flagdef.max)
      args = [low, high]
      if val is not None:
          initial = flag_util.encode_flag_val(val)
          args.append(initial)
      return f"{func_name}[{':'.join(args)}]"
  
file_path: guildai/guild/plugins/skopt.py
imports: import yaml
  import guild
  from guild import flag_util
  from guild import model
  from guild import model_proxy
  from guild import plugin
label_desc: Use image node_id 4 for calling a global function with example usage: _encode_function(flagdef, val) and returns: func_name, str, str, str