code: def tests_from_manifest_and_tags(testdir_from_ns, tags):
      include_tags = [
          tag.lower() for tag in tags if not tag.startswith("-")
      ]
      exclude_tags = [
          tag[1:].lower() for tag in tags if tag.startswith("-")
      ]
  
      for test in tests_from_manifest(testdir_from_ns):
          test_tags = [t.lower() for t in test.tags()]
  
          matching_exclude_tags = [
              t for t in exclude_tags if t in test_tags
          ]
          if matching_exclude_tags:
              # log.debug("test '%s' matches exclude tag(s) '%s': skipping",
              #          test.shortname(), "', '".join(matching_exclude_tags))
              continue
  
          if not include_tags:
              yield test
          else:
              for tag in include_tags:
                  if tag not in test_tags:
                      # log.debug("test '%s' does not match tag '%s': skipping",
                      #          test.shortname(), tag)
                      break
              else:
                  # log.debug("test '%s' matches tags: %s", test.shortname(),
                  #          ' '.join(tags))
                  yield test
  
imports: import os
  from os.path import join, basename, abspath, splitext, isfile, isdir, normpath, exists
  import sys
  import getopt
  import glob
  import time
  import unittest
  import importlib
  import logging
  import textwrap
  import traceback
label_desc: Use image node_id 7 for calling a global function with example usage: tests_from_manifest_and_tags(testdir_from_ns, tags) without return types