code: def _get_reg(cls):
          
          # We have to do this on-demand in case task names have changed later
          reg = dict()
          for task_cls in cls._reg:
              if not task_cls._visible_in_registry:
                  continue
  
              name = task_cls.get_task_family()
              if name in reg and \
                      (reg[name] == Register.AMBIGUOUS_CLASS or  # Check so issubclass doesn't crash
                       not issubclass(task_cls, reg[name])):
                  # Registering two different classes - this means we can't instantiate them by name
                  # The only exception is if one class is a subclass of the other. In that case, we
                  # instantiate the most-derived class (this fixes some issues with decorator wrappers).
                  reg[name] = Register.AMBIGUOUS_CLASS
              else:
                  reg[name] = task_cls
  
          return reg
docs: Return all of the registered classes.
  
          :return:  an ``dict`` of task_family -> class