class_docstr: Base class for monitoring Tasks on the system.
  Inherit to implement specific logic
class_docstr_tok: ["Base","class","for","monitoring","Tasks","on","the","system",".","Inherit","to","implement","specific","logic"]
docstr: Convert project names / regular expressions into project IDs
  
  :return: list of project ids (strings)
docstr_tok: ["Convert","project","names","\/","regular","expressions","into","project","IDs",":","return",":","list","of","project","ids","(","strings",")"]
code: def _get_projects_ids(self):
      # type: () -> Optional[Sequence[str]]
      """
      Convert project names / regular expressions into project IDs
  
      :return: list of project ids (strings)
      """
      if not self._project_ids and not self._project_names_re:
          return None
  
      # refresh project ids every 5 minutes
      if (
          self._projects_refresh_timestamp
          and self._projects is not None
          and time() - self._projects_refresh_timestamp < 60.0 * 5
      ):
          return self._projects
  
      # collect specific selected IDs
      project_ids = self._project_ids or []
  
      # select project id based on name matching
      for name_re in self._project_names_re:
          results = self._get_api_client().projects.get_all(
              name=name_re
          )
          project_ids += [r.id for r in results]
  
      self._projects_refresh_timestamp = time()
      self._projects = project_ids
      return self._projects
  
file_path: clearml/clearml/automation/monitor.py
imports: from datetime import datetime
  from time import time, sleep
  from typing import Optional, Sequence
  from ..backend_api.session.client import APIClient
  from ..backend_interface.util import exact_match_regex
  from ..task import Task
label_desc: Use image node_id 8 for calling the Monitor obj's underlying member method code with example usage: obj._get_projects_ids() and returns: self, None, self