code: def _image_tag_for_project(
      project_id: str, image_id: str, include_tag: bool = True
  ) -> str:
      """Generate the GCR Docker image tag for the supplied pair of project_id and
      image_id.
  
      This function properly handles "domain scoped projects", where the project ID
      contains a domain name and project ID separated by :
      https://cloud.google.com/container-registry/docs/overview#domain-scoped_projects.
  
      """
      project_s = project_id.replace(":", "/")
      base = f"gcr.io/{project_s}/{image_id}"
      return f"{base}:latest" if include_tag else base
  
imports: import json
  import subprocess
  from absl import logging
label_desc: Use image node_id 1 for calling a global function with example usage: _image_tag_for_project(project_id, image_id, include_tag) and returns: unknown