<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_path(rule, path):
 """ Match path. (True, {}) (False, {}) (True, {'user_id': '1'}) (True, {'user_id': 'not-integer'}) """

    split_rule = split_by_slash(rule)
    split_path = split_by_slash(path)
    url_vars = {}

    if len(split_rule) != len(split_path):
        return False, {}

    for r, p in zip(split_rule, split_path):
        if r.startswith('{') and r.endswith('}'):
            url_vars[r[1:-1]] = p
            continue
        if r != p:
            return False, {}
    return True, url_vars