<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_match_info(match, soccer=False):
 """ Parse string containing info of a specific match :param match: Match data :type match: string :param soccer: Set to true if match contains soccer data, defaults to False :type soccer: bool, optional :return: Dictionary containing match information :rtype: dict """

    match_info = {}

    i_open = match.index('(')
    i_close = match.index(')')
    match_info['league'] = match[i_open + 1:i_close].strip()

    match = match[i_close + 1:]
    i_vs = match.index('vs')
    i_colon = match.index(':')
    match_info['home_team'] = match[0:i_vs].replace('#', ' ').strip()
    match_info['away_team'] = match[i_vs + 2:i_colon].replace('#', ' ').strip()
    match = match[i_colon:]

    if soccer:
        i_hyph = match.index('-')
        match_info['match_score'] = match[1:i_hyph + 2].strip()
        match = match[i_hyph + 1:]
        i_hyph = match.index('-')
        match_info['match_time'] = match[i_hyph + 1:].strip()
    else:
        match_info['match_score'] = match[1:].strip()

    return match_info