def _recreate_irreducible_unit(cls, names, registered):
 registry = get_current_unit_registry().registry
 if (names[0] in registry):
  return registry[names[0]]
 else:
  unit = cls(names)
  if registered:
   get_current_unit_registry().add_enabled_units([unit])

def _recreate_irreducible_unit ( cls , names , registered ) : registry = get_current_unit_registry ( ) . registry if ( names [ 0 ] in registry ) : return registry [ names [ 0 ] ] else : unit = cls ( names ) if registered : get_current_unit_registry ( ) . add_enabled_units ( [ unit ] )
this is used to reconstruct units when passed around by multiprocessing .