code: def get_num_enqueued_tasks(session, queue_id):
      # type: ('Session', str) -> Optional[int] # noqa: F821
      res = session.send(queues.GetNumEntriesRequest(queue=queue_id))
      if res and res.response and res.response.num is not None:
          return res.response.num
      return None
  
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 7 for calling a global function with example usage: get_num_enqueued_tasks(session, queue_id) and returns: None, res