def load(force=False):
if GRAFTS and not force:<EOL><INDENT>return GRAFTS<EOL><DEDENT>userpath = settings.userpath<EOL>if os.path.isdir(userpath) and userpath not in __path__:<EOL><INDENT>__path__.append(userpath)<EOL><DEDENT>def notify_error(name):<EOL><INDENT>logging.error('<STR_LIT>' % name)<EOL><DEDENT>walker = walk_packages(__path__, '<STR_LIT>' % __name__, onerror=notify_error)<EOL>for module_finder, name, ispkg in walker:<EOL><INDENT>loader = module_finder.find_module(name)<EOL>mod = loader.load_module(name)<EOL>for func in mod.__dict__.values():<EOL><INDENT>if is_graft(func):<EOL><INDENT>GRAFTS.append(func)<EOL><DEDENT><DEDENT><DEDENT>for entry_point in iter_entry_points(group=settings.entry_point):<EOL><INDENT>try:<EOL><INDENT>func = entry_point.load()<EOL>if is_graft(func):<EOL><INDENT>GRAFTS.append(func)<EOL><DEDENT>else:<EOL><INDENT>notify_error(entry_point.name)<EOL><DEDENT><DEDENT>except Exception as error:<EOL><INDENT>logging.exception(error)<EOL>notify_error(entry_point.name)<EOL><DEDENT><DEDENT>return GRAFTS<EOL>
Magical loading of all grafted functions.

    Parameters:
        force (bool): force reload