code: def get_proc_name(cmd):
      
      if isinstance(cmd, Iterable) and not isinstance(cmd, str):
          cmd = " ".join(cmd)
  
      return cmd.split()[0].replace('(', '').replace(')', '')
docs: Get the representative process name from complex command
  
      :param str | list[str] cmd: a command to be processed
      :return str: the basename representative command