code: def register_benchmark(benchmark):
      """Add a new benchmark."""
      for b in _BENCHMARKS:
          if b["name"] == benchmark["name"]:
              raise ValueError(
                  "Benchmark with name %s already registered!"
                  % b["name"]
              )
  
      # automatically add a description if it is not present
      if "tasks" in benchmark:
          for t in benchmark["tasks"]:
              if "desc" not in t:
                  t["desc"] = remove_version_re.sub(
                      "", t.get("env_id", t.get("id"))
                  )
      _BENCHMARKS.append(benchmark)
  
imports: import os
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: register_benchmark(benchmark) without return types