code: def _validate_target_type(val, desc):
      if val in ("link", "copy"):
          return val
      raise OpDependencyError(
          f"unsupported target-type '{val}' in {desc} (expected 'link' or 'copy')"
      )
  
imports: import os
  import re
  import logging
  import typing
  from guild import cli
  from guild import resolver
  from guild import resourcedef
  from guild import util
label_desc: Use image node_id 28 for calling a global function with example usage: _validate_target_type(val, desc) and returns: val