code: def _instance_from_process(self, process):
      
      return ProcessManager(name=process.name(),
                            pid=process.pid,
                            process_name=process.name(),
                            metadata_base_dir=self._metadata_base_dir)
docs: Default converter from psutil.Process to process instance classes for subclassing.