code: def register_meter(name, bypass_checks=False):
      """Registers a :class:`ClassyMeter` subclass.
  
      This decorator allows Classy Vision to instantiate a subclass of
      ClassyMeter from a configuration file, even if the class itself is not
      part of the Classy Vision framework. To use it, apply this decorator to a
      ClassyMeter subclass, like this:
  
      .. code-block:: python
  
          @register_meter('accuracy')
          class AccuracyMeter(ClassyMeter):
              ...
  
      To instantiate a meter from a configuration file, see
      :func:`build_meter`."""
  
      def register_meter_cls(cls):
          if not bypass_checks:
              if name in METER_REGISTRY:
                  msg = "Cannot register duplicate meter ({}). Already registered at \n{}\n"
                  raise ValueError(
                      msg.format(name, METER_REGISTRY_TB[name])
                  )
              if not issubclass(cls, ClassyMeter):
                  raise ValueError(
                      "Meter ({}: {}) must extend \
                      ClassyMeter".format(
                          name, cls.__name__
                      )
                  )
          tb = "".join(traceback.format_stack())
          METER_REGISTRY[name] = cls
          METER_REGISTRY_TB[name] = tb
          return cls
  
      return register_meter_cls
  
file_path: ClassyVision/classy_vision/meters/__init__.py
imports: import traceback
  from pathlib import Path
  from classy_vision.generic.registry_utils import import_all_modules
  from .classy_meter import ClassyMeter
  from .accuracy_meter import AccuracyMeter
  from .precision_meter import PrecisionAtKMeter
  from .recall_meter import RecallAtKMeter
  from .video_accuracy_meter import VideoAccuracyMeter
label_desc: Use image node_id 3 for calling a global function with example usage: register_meter(name, bypass_checks) and returns: register_meter_cls, cls