code: def get_distributed_test_cases(
      suite: Union[TestCase, TestSuite]
  ) -> Set[str]:
      found_cases = set()
      if isinstance(suite, TestSuite):
          for x in suite:
              found_cases.update(get_distributed_test_cases(x))
  
      if isinstance(suite, TestCase):
          case_id = suite.id()
  
          if case_id.startswith("distributed.") or case_id.startswith(
              "tests.distributed."
          ):
              found_cases.add(case_id)
  
          if "_FailedTest" in case_id:
              raise RuntimeError(
                  f"Errors encountered while listing test cases: {case_id}"
              )
  
      return found_cases
  
file_path: avalanche/tests/run_dist_tests.py
imports: import os
  import signal
  import sys
  import unittest
  from subprocess import Popen
  from typing import Union, Set
  from unittest import TestSuite, TestCase
  import click
label_desc: Use image node_id 1 for calling a global function with example usage: get_distributed_test_cases(suite) and returns: found_cases