<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_banners(self):
 """Parses the global config and returns the value for both motd and login banners. Returns: dict: The configure value for modtd and login banners. If the banner is not set it will return a value of None for that key. The returned dict object is intendd to be merged into the resource dict """

        motd_value = login_value = None
        matches = re.findall('^banner\s+(login|motd)\s?$\n(.*?)$\nEOF$\n',
                             self.config, re.DOTALL | re.M)
        for match in matches:
            if match[0].strip() == "motd":
                motd_value = match[1]
            elif match[0].strip() == "login":
                login_value = match[1]

        return dict(banner_motd=motd_value, banner_login=login_value)