def __init__(self, config=None):
        """Initializes the controller with basic settings.

        Args:
            config: The configuration for the controller, which is loaded from
                the configuration file. This field should be a dictionary.
                (default: None)
        """
        config = config or dict()
        assert isinstance(config, dict)

        self._name = self.__class__.__name__
        self._config = config.copy()
        priority = config.get('priority', 'MEDIUM')
        self._priority = _parse_controller_priority(priority)
        self._every_n_iters = config.get('every_n_iters', -1)
        self._every_n_epochs = config.get('every_n_epochs', -1)
        self._first_iter = config.get('first_iter', True)
        self._master_only = config.get('master_only', False)
Initializes the controller with basic settings.

        Args:
            config: The configuration for the controller, which is loaded from
                the configuration file. This field should be a dictionary.
                (default: None)
        
runners/controllers/base_controller.py