def METHOD_NAME(depth = 3, maxparam = 0):
    def recursion():
        return METHOD_NAME(depth = depth-1, maxparam = maxparam)
    if depth == 0:
        if maxparam != 0 and random.randint(0, 1) != 0:
            return 'p%02d' % random.randint(0, maxparam-1)
        return random.choice([ '%e', '%f', '%g' ]) % random.uniform(-2, +2)
    if random.randint(0, 4) == 0:
        return recursion() + random.choice([ ' < ', ' <= ', ' == ', ' != ', ' >= ', ' > ' ]) + recursion() + ' ? ' + recursion() + ' : ' + recursion()
    op_prefix = [ '+(', '-(' ]
    op_infix = [ ' + ', ' - ', ' * ', ' / ' ]
    op_func1 = [ '$ln', '$log10', '$exp', '$sqrt', '$floor', '$ceil', '$sin', '$cos', '$tan', '$asin', '$acos', '$atan', '$sinh', '$cosh', '$tanh', '$asinh', '$acosh', '$atanh' ]
    op_func2 = [ '$pow', '$atan2', '$hypot' ]
    op = random.choice(op_prefix + op_infix + op_func1 + op_func2)
    if op in op_prefix:
        return op + recursion() + ')'
    if op in op_infix:
        return '(' + recursion() + op + recursion() + ')'
    if op in op_func1:
        return op + '(' + recursion() + ')'
    if op in op_func2:
        return op + '(' + recursion() + ', ' + recursion() + ')'
    raise