code: def get_existing_project(session, project_name):
      """Return either the project ID if it exists, an empty string if it doesn't or None if backend request failed."""
      res = session.send(
          projects.GetAllRequest(
              name=exact_match_regex(project_name),
              only_fields=["id"],
              search_hidden=True,
              _allow_extra_fields_=True,
          )
      )
      if not res:
          return None
      if res.response and res.response.projects:
          return res.response.projects[0].id
      return ""
  
imports: import getpass
  import re
  from _socket import gethostname
  from datetime import datetime
  from typing import Optional, Any
  from ..backend_api.services import projects, queues
  from ..debugging.log import get_logger, LoggerRoot
label_desc: Use image node_id 2 for calling a global function with example usage: get_existing_project(session, project_name) and returns: str, None, res