code: def transform_target_platforms(target_platforms):
      platform_tags = set()
      for platform in target_platforms:
          if "linux" in platform:
              platform_tags = platform_tags.union(PL_LINUX)
          elif "darwin" in platform:
              if "arm64" in platform:
                  platform_tags = platform_tags.union(PL_MACOS_ARM64)
              else:
                  platform_tags = platform_tags.union(PL_MACOS_X86_64)
          elif "win" in platform:
              platform_tags = platform_tags.union(PL_WIN)
          else:
              raise Exception(
                  "Unsupported platform {}".format(platform)
              )
      return list(platform_tags)
  
imports: from __future__ import print_function
  import glob
  import subprocess
  import shutil
  import os
  import stat
  import sys
  import platform
  import tempfile
  import hashlib
  from base64 import urlsafe_b64encode
  from argparse import ArgumentParser
  from enum import Enum
label_desc: Use image node_id 4 for calling a global function with example usage: transform_target_platforms(target_platforms) and returns: list