<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_array_member_state(self, block):
 """ Parse the state of the the md array members. { 'active': 2, 'faulty': 0, 'spare': 1 } :return: dictionary of states with according count :rtype: dict """

        members = block.split('\n')[0].split(' : ')[1].split(' ')[2:]

        device_regexp = re.compile(
            '^(?P<member_name>.*)'
            '\[(?P<member_role_number>\d*)\]'
            '\(?(?P<member_state>[FS])?\)?$'
        )

        ret = {
            'active': 0,
            'faulty': 0,
            'spare': 0
        }
        for member in members:
            member_dict = device_regexp.match(member).groupdict()

            if member_dict['member_state'] == 'S':
                ret['spare'] += 1
            elif member_dict['member_state'] == 'F':
                ret['faulty'] += 1
            else:
                ret['active'] += 1

        return ret