code: def _infos_to_str(infos):
      return "\n".join(
          "  (PID {}): {}".format(info["pid"], info["cmd"])
          for info in infos
      )
  
imports: import json
  import os
  from collections import defaultdict
  from contextlib import contextmanager
  import psutil
  from voluptuous import Invalid, Optional, Required, Schema
  from dvc.log import logger
  from .exceptions import DvcException
  from .fs import localfs
  from .lock import make_lock
  from .utils import relpath
label_desc: Use image node_id 2 for calling a global function with example usage: _infos_to_str(infos) and returns: str