def  format_number(xc, p, args):
    if len(args) != 2: raise XPathContext.FunctionNumArgs()
    value = numericArg(xc, p, args, 0, missingArgFallback='NaN', emptyFallback='NaN')
    picture = stringArg(xc, args, 1, "xs:string", missingArgFallback='', emptyFallback='')
    try:
        return format_picture(xc.modelXbrl.locale, value, picture)
    except __HOLE__ as err:
        raise XPathContext.XPathException(p, 'err:FODF1310', str(err) )
dataset/ETHPy150Open Arelle/Arelle/arelle/FunctionFn.py/format_number