docstr: Given a namespace package, yield the components of that
  package.
  
  >>> names = Installer._pkg_names('a.b.c')
  >>> set(names) == set(['a', 'a.b', 'a.b.c'])
  True
docstr_tok: ["Given","a","namespace","package",",","yield","the","components","of","that","package",".",">",">",">","names","=","Installer._pkg_names","(","'","a.b.c","'",")",">",">",">","set","(","names",")","==","set","(","[","'","a","'",",","'","a.b","'",",","'","a.b.c","'","]",")","True"]
code: def _pkg_names(pkg):
      """
      Given a namespace package, yield the components of that
      package.
  
      >>> names = Installer._pkg_names('a.b.c')
      >>> set(names) == set(['a', 'a.b', 'a.b.c'])
      True
      """
      parts = pkg.split(".")
      while parts:
          yield ".".join(parts)
          parts.pop()
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/namespaces.py
imports: import os
  from distutils import log
  import itertools
label_desc: Use image node_id 8 for calling the Installer obj's underlying member method code with example usage: obj._pkg_names(pkg) without return types