code: def check_package(self, package, package_dir):
      # Empty dir name means current directory, which we can probably
      # assume exists.  Also, os.path.exists and isdir don't know about
      # my "empty string means current dir" convention, so we have to
      # circumvent them.
      if package_dir != "":
          if not os.path.exists(package_dir):
              raise DistutilsFileError(
                  "package directory '%s' does not exist" % package_dir
              )
          if not os.path.isdir(package_dir):
              raise DistutilsFileError(
                  "supposed package directory '%s' exists, "
                  "but is not a directory" % package_dir
              )
  
      # Require __init__.py for all but the "root package"
      if package:
          init_py = os.path.join(package_dir, "__init__.py")
          if os.path.isfile(init_py):
              return init_py
          else:
              log.warn(
                  (
                      "package init file '%s' not found "
                      + "(or not a regular file)"
                  ),
                  init_py,
              )
  
      # Either not in a package at all (__init__.py not expected), or
      # __init__.py doesn't exist -- so don't return the filename.
      return None
  
imports: import os
  import importlib.util
  import sys
  import glob
  from distutils.core import Command
  from distutils.errors import *
  from distutils.util import convert_path, Mixin2to3
  from distutils import log
label_desc: Use image node_id 8 for calling the build_py obj's underlying member method code with example usage: obj.check_package(package, package_dir) and returns: None, init_py