Partially format a format_string, swapping out any '{methodname}' or '{methodnamehyphen}' components.

def replace_methodname(format_string, methodname):
    """
    Partially format a format_string, swapping out any '{methodname}' or '{methodnamehyphen}' components.
    """

    methodnamehyphen = methodname.replace('_', '-')
    ret = format_string
    ret = ret.replace('{methodname}', methodname)
    ret = ret.replace('{methodnamehyphen}', methodnamehyphen)
    return ret