def METHOD_NAME(self):
    if self.config_file is not None:
        """Reads the configuration file and returns it as a dictionary"""
        if self.config_type == 'ini':
            config = ConfigParser()
            config.METHOD_NAME(self.config_file)
            # noinspection PyProtectedMember
            res = config._sections
        elif self.config_type == 'json':
            with open(self.config_file, 'r') as f:
                res = json.load(f)
        elif self.config_type == 'yaml' or self.config_type == 'yml':
            with open(self.config_file, 'r') as f:
                res = yaml.load(f)
        else:
            raise ValueError('Invalid configuration type')
    elif self.config_string is not None:
        if self.config_type == 'ini':
            config = ConfigParser()
            config.read_string(self.config_string)
            res = config._sections
        elif self.config_type == 'json':
            res = json.loads(self.config_string)
        elif self.config_type == 'yaml' or self.config_type == 'yml':
            res = yaml.load(self.config_string)
        else:
            raise ValueError('Invalid configuration type')
    else:
        res = None
    return res or {}