def METHOD_NAME(key, holder, replacer_function, property_list, gap, stack, space):
    value = holder.get(key)
    if is_object(value):
        to_json = value.get('toJSON')
        if is_callable(to_json):
            value = to_json.call(value, (key, ))
    if not is_undefined(replacer_function):
        value = replacer_function.call(holder, (key, value))
    if is_object(value):
        if value.Class == 'String':
            value = to_string(value)
        elif value.Class == 'Number':
            value = to_number(value)
        elif value.Class == 'Boolean':
            value = to_boolean(value)
    typ = Type(value)
    if is_null(value):
        return 'null'
    elif typ == 'Boolean':
        return 'true' if value else 'false'
    elif typ == 'String':
        return Quote(value)
    elif typ == 'Number':
        if not is_infinity(value):
            return to_string(value)
        return 'null'
    if is_object(value) and not is_callable(value):
        if value.Class == 'Array':
            return ja(value, stack, gap, property_list, replacer_function,
                      space)
        else:
            return jo(value, stack, gap, property_list, replacer_function,
                      space)
    return undefined