(code, cell_count, base_globals=None)
return types.FunctionType(code, base_globals, None, None, closure)
Creates a skeleton function object that contains just the provided
        code and the correct number of cells in func_closure.  All other
        func attributes (e.g. func_globals) are empty.
Creates a skeleton function object that contains just the provided
        code and the correct number of cells in func_closure.  All other
        func attributes (e.g. func_globals) are empty.
Creates a skeleton function object that contains just the provided code and the correct number of cells in func_closure . All other func attributes ( e . g . func_globals ) are empty .
def _make_skel_func(code, cell_count, base_globals=None):
    """ Creates a skeleton function object that contains just the provided
        code and the correct number of cells in func_closure.  All other
        func attributes (e.g. func_globals) are empty.
    """
    # This is backward-compatibility code: for cloudpickle versions between
    # 0.5.4 and 0.7, base_globals could be a string or None. base_globals
    # should now always be a dictionary.
    if base_globals is None or isinstance(base_globals, str):
        base_globals = {}

    base_globals["__builtins__"] = __builtins__

    closure = (
        tuple(_make_empty_cell() for _ in range(cell_count))
        if cell_count >= 0
        else None
    )
    return types.FunctionType(code, base_globals, None, None, closure)
def _make_skel_func ( code , cell_count , base_globals = None ) : # This is backward-compatibility code: for cloudpickle versions between # 0.5.4 and 0.7, base_globals could be a string or None. base_globals # should now always be a dictionary. if base_globals is None or isinstance ( base_globals , str ) : base_globals = { } base_globals [ "__builtins__" ] = __builtins__ closure = ( tuple ( _make_empty_cell ( ) for _ in range ( cell_count ) ) if cell_count >= 0 else None ) return types . FunctionType ( code , base_globals , None , None , closure )