code: def get_process_id_list(self, sentry_unit, process_name,
                              expect_success=True, pgrep_full=False):
          
          if pgrep_full:
              cmd = 'pgrep -f "{}"'.format(process_name)
          else:
              cmd = 'pidof -x "{}"'.format(process_name)
          if not expect_success:
              cmd += " || exit 0 && exit 1"
          output, code = sentry_unit.run(cmd)
          if code != 0:
              msg = ('{} `{}` returned {} '
                     '{}'.format(sentry_unit.info['unit_name'],
                                 cmd, code, output))
              amulet.raise_status(amulet.FAIL, msg=msg)
          return str(output).split()
docs: Get a list of process ID(s) from a single sentry juju unit
          for a single process name.
  
          :param sentry_unit: Amulet sentry instance (juju unit)
          :param process_name: Process name
          :param expect_success: If False, expect the PID to be missing,
              raise if it is present.
          :returns: List of process IDs