class_docstr: Fill-in metadata and options that can be automatically derived
  (from other metadata/options, the file system or conventions)
class_docstr_tok: ["Fill-in","metadata","and","options","that","can","be","automatically","derived","(","from","other","metadata\/options",",","the","file","system","or","conventions",")"]
docstr: Try to find the root package that is not a PEP 420 namespace
code: def _find_name_from_packages(self) -> Optional[str]:
      """Try to find the root package that is not a PEP 420 namespace"""
      if not self.dist.packages:
          return None
  
      packages = remove_stubs(sorted(self.dist.packages, key=len))
      package_dir = self.dist.package_dir or {}
  
      parent_pkg = find_parent_package(
          packages, package_dir, self._root_dir
      )
      if parent_pkg:
          log.debug(
              f"Common parent package detected, name: {parent_pkg}"
          )
          return parent_pkg
  
      log.warn(
          "No parent package detected, impossible to derive `name`"
      )
      return None
  
imports: import itertools
  import os
  from fnmatch import fnmatchcase
  from glob import glob
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
  import _distutils_hack.override
  from distutils import log
  from distutils.util import convert_path
label_desc: Use image node_id 17 for calling the ConfigDiscovery obj's underlying member method code with example usage: obj._find_name_from_packages() and returns: None, None, parent_pkg