code: def next_global_count(name, reset=False):
      """A global counter to create UIDs.
      Return the total number of times (0-indexed) the function has been called with the given name.
      Used to create the increasing UID counts for each class (e.g. "Sphere.007").
      When passing reset=True, then all counts are reset.
      """
      if reset or not hasattr(next_global_count, "counter"):
          next_global_count.counter = collections.defaultdict(int)
          next_global_count.lock = multiprocessing.Lock()
  
      with next_global_count.lock:
          counter = next_global_count.counter[name]
          next_global_count.counter[name] += 1
          return counter
  
imports: from absl.flags import argparse_flags
  import collections
  import copy
  import logging
  import multiprocessing
  import multiprocessing.pool
  import pathlib
  import pprint
  import shutil
  import sys
  import tempfile
  from etils import epath
  import numpy
  from kubric import core
  from kubric import file_io
label_desc: Use image node_id 11 for calling a global function with example usage: next_global_count(name, reset) and returns: counter