def dynamic_import(modname, import_tuples, developing=True, ignore_froms=[],
                   dump=False, ignore_startswith=[], ignore_endswith=[],
                   ignore_list=[], check_not_imported=True, return_initstr=False,
                   verbose=False):
    if verbose:
        print('[UTIL_IMPORT] Running Dynamic Imports for modname=%r ' % modname)
    try:
        module = sys.modules[modname]
    except:
        module = __import__(modname)
    imports = [tup[0] for tup in import_tuples]
    __excecute_imports(module, modname, imports, verbose=verbose)
    if developing:
        from_imports = __execute_fromimport_star(module, modname, import_tuples,
                                                 ignore_list=ignore_list,
                                                 ignore_startswith=ignore_startswith,
                                                 ignore_endswith=ignore_endswith,
                                                 check_not_imported=check_not_imported,
                                                 verbose=verbose)
    else:
        from_imports = __execute_fromimport(module, modname, import_tuples, verbose=verbose)
    inject_execstr = _inject_execstr(modname, import_tuples)
    dump_requested = (('--dump-%s-init' % modname) in sys.argv or
                      ('--print-%s-init' % modname) in sys.argv) or dump
    overwrite_requested = ('--update-%s-init' % modname) in sys.argv
    if verbose:
        print('[UTIL_IMPORT] Finished Dynamic Imports for modname=%r ' % modname)
    if dump_requested:
        is_main_proc = multiprocessing.current_process().name == 'MainProcess'
        if is_main_proc:
            from utool import util_str
            initstr = _initstr(modname, imports, from_imports, inject_execstr)
            print(util_str.indent(initstr))
    if overwrite_requested:
        is_main_proc = multiprocessing.current_process().name == 'MainProcess'
        if is_main_proc:
            from utool import util_str
            from os.path import join, exists
            initstr = _initstr(modname, imports, from_imports, inject_execstr, withheader=False)
            new_else = util_str.indent(initstr)
            init_fpath = join(module.__path__[0], '__init__.py')
            print('attempting to update: %r' % init_fpath)
            assert exists(init_fpath)
            new_lines = []
            editing = False
            updated = False
            with open(init_fpath, 'r') as file_:
                lines = file_.readlines()
                for line in lines:
                    if not editing:
                        new_lines.append(line)
                    if line.strip().startswith('
                        new_lines.append('\n' + new_else + '\n
                        editing = True
                        updated = True
                    if line.strip().startswith('
                        editing = False
            if updated:
                print('writing updated file: %r' % init_fpath)
                new_text = ''.join(new_lines)
                with open(init_fpath, 'w') as file_:
                    file_.write(new_text)
            else:
                print('no write hook for file: %r' % init_fpath)
    if return_initstr:
        initstr = _initstr(modname, imports, from_imports, '', withheader=False)
        return inject_execstr, initstr
    else:
        return inject_execstr