code: def test_benchmark_comparator():
      unit = "micros"
  
      assert not BenchmarkComparator(
          Benchmark("contender", unit, True, [10], unit, [1]),
          Benchmark("baseline", unit, True, [20], unit, [1]),
      ).regression
  
      assert BenchmarkComparator(
          Benchmark("contender", unit, False, [10], unit, [1]),
          Benchmark("baseline", unit, False, [20], unit, [1]),
      ).regression
  
      assert BenchmarkComparator(
          Benchmark("contender", unit, True, [20], unit, [1]),
          Benchmark("baseline", unit, True, [10], unit, [1]),
      ).regression
  
      assert not BenchmarkComparator(
          Benchmark("contender", unit, False, [20], unit, [1]),
          Benchmark("baseline", unit, False, [10], unit, [1]),
      ).regression
  
imports: import json
  from archery.benchmark.codec import JsonEncoder
  from archery.benchmark.core import Benchmark, median
  from archery.benchmark.compare import BenchmarkComparator, RunnerComparator
  from archery.benchmark.google import GoogleBenchmark, GoogleBenchmarkObservation
  from archery.benchmark.runner import StaticBenchmarkRunner
label_desc: Use image node_id 1 for calling a global function with example usage: test_benchmark_comparator() without return types