code: def check_target_module_exists(key: str, target_modules: List[str]):
      """Check if the target_modules matchs the given key."""
  
      return any(
          [key.endswith(target_key) for target_key in target_modules]
      )
  
imports: from typing import List
  import torch
  from typeguard import check_argument_types
label_desc: Use image node_id 2 for calling a global function with example usage: check_target_module_exists(key, target_modules) and returns: any