original_docstring: 
          Execute each provided service expression against lines in ps and store
          each full line in a list against the service matched.
          
docstring: Execute each provided service expression against lines in ps and store
  each full line in a list against the service matched.
docstring_tokens: Execute each provided service expression against lines in ps and store each full line in a list against the service matched .
code: def _get_running_services(self):
          """
          Execute each provided service expression against lines in ps and store
          each full line in a list against the service matched.
          """
          for line in CLIHelper().ps():
              for expr, hint in self.service_exprs:
                  if hint:
                      ret = re.compile(hint).search(line)
                      if not ret:
                          continue
  
                  """
                  look for running process with this name.
                  We need to account for different types of process binary e.g.
  
                  /snap/<name>/1830/<svc>
                  /usr/bin/<svc>
  
                  and filter e.g.
  
                  /var/lib/<svc> and /var/log/<svc>
                  """
                  for expr_tmplt in SVC_EXPR_TEMPLATES.values():
                      ret = re.compile(expr_tmplt.format(expr)).match(line)
                      if ret:
                          svc = ret.group(1)
                          if svc not in self.services:
                              self.services[svc] = {"ps_cmds": []}
  
                          self.services[svc]["ps_cmds"].append(ret.group(0))
                          break
code_tokens: def _get_running_services ( self ) : for line in CLIHelper ( ) . ps ( ) : for expr , hint in self . service_exprs : if hint : ret = re . compile ( hint ) . search ( line ) if not ret : continue """
                  look for running process with this name.
                  We need to account for different types of process binary e.g.
  
                  /snap/<name>/1830/<svc>
                  /usr/bin/<svc>
  
                  and filter e.g.
  
                  /var/lib/<svc> and /var/log/<svc>
                  """ for expr_tmplt in SVC_EXPR_TEMPLATES . values ( ) : ret = re . compile ( expr_tmplt . format ( expr ) ) . match ( line ) if ret : svc = ret . group ( 1 ) if svc not in self . services : self . services [ svc ] = { "ps_cmds" : [ ] } self . services [ svc ] [ "ps_cmds" ] . append ( ret . group ( 0 ) ) break
short_docstring: Execute each provided service expression against lines in ps and store
  each full line in a list against the service matched.
short_docstring_tokens: Execute each provided service expression against lines in ps and store each full line in a list against the service matched .
comment: """
          Execute each provided service expression against lines in ps and store
          each full line in a list against the service matched.
          """$SEP$"""
                  look for running process with this name.
                  We need to account for different types of process binary e.g.
  
                  /snap/<name>/1830/<svc>
                  /usr/bin/<svc>
  
                  and filter e.g.
  
                  /var/lib/<svc> and /var/log/<svc>
                  """