docs: def pkg_manager_init(
              self, package_names, overwrite=False, merge=False,
              callback=None, **kw):
          """
          Note: default implementation calls for npm and package.json,
          please note that it may not be the case for this instance of
          Driver.
  
          If this class is initiated using standard procedures, this will
          emulate the functionality of ``npm init`` for the generation of
          a working ``package.json``, but without asking users for input
          but instead uses information available through the distribution
          packages within ``setuptools``.
  
          Arguments:
  
          package_names
              The names of the python packages with their requirements to
              source the package.json from.
  
          overwrite
              Boolean flag; if set, overwrite package.json with the newly
              generated ``package.json``;
  
          merge
              Boolean flag; if set, implies overwrite, but does not ignore
              interactive setting.  However this will keep details defined
              in existing ``package.json`` and only merge dependencies /
              devDependencies defined by the specified Python package.
  
          callback
              A callable.  If this is passed, the value for overwrite will
              be derived from its result; it will be called with arguments
              (original_json, pkgdef_json, pkgdef_path, dumps=self.dumps).
              Typically the calmjs.ui.prompt_overwrite_json is passed into
              this argument; refer to its documentation on details.
  
          Returns generated definition file if successful; can be achieved
          by writing a new file or that the existing one matches with the
          expected version.  Returns False otherwise.
          """
  
          # this will be modified in place
          original_json = {}
  
          pkgdef_json = self.pkg_manager_view(package_names, **kw)
  
          # Now we figure out the actual file we want to work with.
          pkgdef_path = self.join_cwd(self.pkgdef_filename)
          existed = exists(pkgdef_path)
  
          if existed:
              try:
                  with open(pkgdef_path, 'r') as fd:
                      original_json = json.load(fd)
              except ValueError:
                  logger.warning(
                      "ignoring existing malformed '%s'", pkgdef_path)
              except (IOError, OSError):
                  logger.error(
                      "reading of existing '%s' failed; "
                      "please confirm that it is a file and/or permissions to "
                      "read and write is permitted before retrying.",
                      pkgdef_path
                  )
                  # Cowardly giving up.
                  raise
  
              if merge:
                  # Merge the generated on top of the original.
                  updates = generate_merge_dict(
                      self.dep_keys, original_json, pkgdef_json,
                  )
                  final = {}
                  final.update(original_json)
                  final.update(pkgdef_json)
                  final.update(updates)
                  pkgdef_json = final
  
              if original_json == pkgdef_json:
                  # Well, if original existing one is identical with the
                  # generated version, we have reached our target.
                  return pkgdef_json
  
              if not overwrite and callable(callback):
                  overwrite = callback(
                      original_json, pkgdef_json, pkgdef_path, dumps=self.dumps)
              else:
                  # here the implied settings due to non-interactive mode
                  # are finally set
                  if merge:
                      overwrite = True
  
              if not overwrite:
                  logger.warning("not overwriting existing '%s'", pkgdef_path)
                  return False
  
          with open(pkgdef_path, 'w') as fd:
              self.dump(pkgdef_json, fd)
          logger.info("wrote '%s'", pkgdef_path)
  
          return pkgdef_json