code: def update_tag_for_image_type(
      subconf: Dict[str, str], new_tag: str
  ) -> bool:
      if new_tag == subconf["new"]:
          return False
  
      subconf["old"] = subconf["new"]
      subconf["new"] = new_tag
      return True
  
file_path: determined/tools/scripts/refresh-ubuntu-amis.py
imports: import argparse
  import json
  import re
  import sys
  from typing import Dict, List, Union
  import requests
  from ruamel import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: update_tag_for_image_type(subconf, new_tag) and returns: True, False