Do a safe processing of input fn in using SAFE_BUILTINS.

    :param fn: function to call with input parameters.
    :param source: source object to process with fn.
    :param dict _globals: global objects by name.
    :param dict _locals: local objects by name.
    :return: fn processing result

def _safe_processing(nsafefn, source, _globals=None, _locals=None):
    """Do a safe processing of input fn in using SAFE_BUILTINS.

    :param fn: function to call with input parameters.
    :param source: source object to process with fn.
    :param dict _globals: global objects by name.
    :param dict _locals: local objects by name.
    :return: fn processing result"""

    if _globals is None:
        _globals = SAFE_BUILTINS

    else:
        _globals.update(SAFE_BUILTINS)

    return nsafefn(source, _globals, _locals)