<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_redistribution(self, config):
 """Parses config file for the OSPF router ID Args: config (str):
 Running configuration Returns: list: dict: keys: protocol (str) route-map (optional) (str) """

        redistributions = list()
        regexp = r'redistribute .*'
        matches = re.findall(regexp, config)
        for line in matches:
            ospf_redist = line.split()
            if len(ospf_redist) == 2:
                # simple redist: eg 'redistribute bgp'
                protocol = ospf_redist[1]
                redistributions.append(dict(protocol=protocol))
            if len(ospf_redist) == 4:
                # complex redist eg 'redistribute bgp route-map NYSE-RP-MAP'
                protocol = ospf_redist[1]
                route_map_name = ospf_redist[3]
                redistributions.append(dict(protocol=protocol,
                                       route_map=route_map_name))
        return dict(redistributions=redistributions)