docs: def parse_project_imports(dpath):
      """
      dpath = ub.truepath('~/code/clab/clab')
  
      Script:
          >>> dpath = ut.get_argval('--dpath')
          >>> parse_project_imports()
  
      """
      import ubelt as ub
      import glob
      from os.path import join, exists
      package_modules = set()
      for fpath in glob.glob(join(dpath, '**/*.py'), recursive=True):
          try:
              sourcecode = ub.readfrom(fpath)
              _, modules = ut.parse_import_names(sourcecode, False, fpath=fpath)
              for mod in modules:
                  package_modules.add(mod.split('.')[0])  # just bases
              if 'clab/live' in package_modules:
                  raise ValueError()
                  break
          except SyntaxError:
              print('encountered SyntaxError in fpath = {!r}'.format(fpath))
      import warnings
      import inspect
      stdlibs = [dirname(warnings.__file__), dirname(inspect.__file__)]
      def is_module_batteries_included(m):
          if m in sys.builtin_module_names:
              return True
          for p in stdlibs:
              if exists(join(p, m + '.py')):
                  return True
              if exists(join(p, m)):
                  return True
      used_modules = sorted([m for m in package_modules if not is_module_batteries_included(m)])
      print('used_modules non-buildin modules = {}'.format(ub.repr2(used_modules)))