code: def replace_methodname(format_string, methodname):
      
  
      methodnamehyphen = methodname.replace('_', '-')
      ret = format_string
      ret = ret.replace('{methodname}', methodname)
      ret = ret.replace('{methodnamehyphen}', methodnamehyphen)
      return ret
docs: Partially format a format_string, swapping out any '{methodname}' or '{methodnamehyphen}' components.