docs: def register_classes(yaml: ruamel.yaml.YAML, classes: Optional[Iterable[Any]] = None) -> ruamel.yaml.YAML:
      """ Register externally defined classes. """
      # Validation
      if classes is None:
          classes = []
  
      # Register the classes
      for cls in classes:
          logger.debug(f"Registering class {cls} with YAML")
          yaml.register_class(cls)
  
      return yaml