code: def set_flags(backend, flags):
      """Set proba on backend"""
      resets = list()
      if "layer" in backend.__class__.__name__.lower():
          updates = [backend] + backend.learners
      elif "group" in backend.__class__.__name__.lower():
          updates = backend.learners
      elif not isinstance(backend, list):
          updates = [backend]
      else:
          updates = backend
  
      for obj in updates:
          _res = dict()
          for key, val in flags.items():
              if hasattr(obj, key):
                  _res[key] = getattr(obj, key)
                  setattr(obj, key, val)
          resets.append((obj, _res))
      return resets
  
file_path: mlens/mlens/parallel/wrapper.py
imports: from ..None import config
  from .base import BaseParallel, OutputMixin
  from .backend import ParallelProcessing
  from ..utils.exceptions import ParallelProcessingError, NotFittedError
label_desc: Use image node_id 2 for calling a global function with example usage: set_flags(backend, flags) and returns: resets