def get_funcnames_from_modpath(modpath, include_methods=True):
    import utool as ut
    if True:
        import jedi
        source = ut.read_from(modpath)
        definition_list = jedi.names(source)
        funcname_list = [definition.name for definition in definition_list if definition.type == 'function']
        if include_methods:
            classdef_list = [definition for definition in definition_list if definition.type == 'class']
            defined_methods = ut.flatten([definition.defined_names() for definition in classdef_list])
            funcname_list += [method.name for method in defined_methods
                              if method.type == 'function' and not method.name.startswith('_')]
    else:
        import redbaron
        sourcecode = ut.read_from(modpath)
        baron = redbaron.RedBaron(sourcecode)
        funcname_list = [node.name for node in baron.find_all('def', recursive=include_methods)
                         if not node.name.startswith('_')]
    return funcname_list