code: def _get_valid_tf_targets(config, targets):
      all_matches = set()
      if not targets:
          return all_matches, True  # Empty targets is acceptable
  
      modules = get_tf_modules(config)
      if not modules:
          return all_matches, False
  
      for target in targets:
          matches = {
              "{}.{}".format(value_type, value)
              if value_type == "module"
              else value
              for value_type, values in modules.items()
              for value in values
              if fnmatch(value, target)
          }
          if not matches:
              LOGGER.error(
                  "Invalid terraform target supplied: %s", target
              )
              continue
          all_matches.update(matches)
  
      if not all_matches:
          LOGGER.error(
              "No terraform targets found matching supplied target(s): %s",
              ", ".join(sorted(targets)),
          )
          return all_matches, False
  
      return all_matches, True
  
imports: from fnmatch import fnmatch
  import json
  import os
  from streamalert.shared.config import firehose_alerts_bucket
  from streamalert.shared.logger import get_logger
  from streamalert.shared.utils import get_data_file_format
  from streamalert_cli.athena.handler import create_table, create_log_tables
  from streamalert_cli.helpers import check_credentials, continue_prompt, run_command
  from streamalert_cli.manage_lambda.deploy import deploy
  from streamalert_cli.terraform.generate import terraform_generate_handler
  from streamalert_cli.terraform.helpers import terraform_check, terraform_runner
  from streamalert_cli.utils import add_clusters_arg, CLICommand, set_parser_epilog, UniqueSortedListAction
label_desc: Use image node_id 2 for calling a global function with example usage: _get_valid_tf_targets(config, targets) and returns: all_matches,  True, all_matches,  True, all_matches,  False, all_matches,  False