code: def _collect_all_tests(attrs, bases, active=True):
      test_attrs = _collect_available_tests(attrs)
      base_attrs = _collect_available_base_tests(bases)
  
      # order matters
      tests = base_attrs | test_attrs
  
      all_tests = {}
      for name, func in tests.items():
          test_function = TestFunction(name, func, active=active)
          all_tests[test_function.vanilla_name] = test_function
  
      return all_tests
  
imports: import functools
  import importlib
  import inspect
  import json
  import os
  import subprocess
  import tempfile
  import types
  import warnings
  import pytest
  from matplotlib import pyplot
  import geomstats.backend
  from geomstats.exceptions import AutodiffNotImplementedError
  from geomstats.test.test_case import autodiff_backend
  from geomstats.test.vectorization import test_vectorization
label_desc: Use image node_id 17 for calling a global function with example usage: _collect_all_tests(attrs, bases, active) and returns: all_tests