code: def _build_process_container_tree(self, pids):
          
          containers = []
          procs = []
          ppids = []
          childs = {}
          for pid in pids:
              proc = process.Process(pid)
              procs.append(proc)
              ppids.append(proc.ppid)
              if proc.ppid not in childs:
                  childs[proc.ppid] = []
              childs[proc.ppid].append(proc)
          ppids = set(ppids)
          tops = [proc for proc in procs if proc.ppid not in pids]
          if len(tops) == 0:
              tops = procs
  
          def build_tree(proc_list):
              _containers = []
              for proc in proc_list:
                  if not self.args.show_kthread and proc.is_kthread():
                      continue
  
                  cont = TreeContainer(proc)
  
                  if proc.pid in childs:
                      cont.childs = build_tree(childs[proc.pid])
                  _containers.append(cont)
              return _containers
  
          for top_proc in tops:
              if not self.args.show_kthread and top_proc.is_kthread():
                  continue
  
              cont = TreeContainer(top_proc)
              if top_proc.pid in childs:
                  cont.childs = build_tree(childs[top_proc.pid])
              containers.append(cont)
  
          return containers
docs: tops = [1,2,3]
          childs = {1: [4,5], 2: [6,7], 3: [], 4: []}