code: def match_path(rule, path):
      
      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
docs: Match path.
  
      >>> match_path('/foo', '/foo')
      (True, {})
      >>> match_path('/foo', '/bar')
      (False, {})
      >>> match_path('/users/{user_id}', '/users/1')
      (True, {'user_id': '1'})
      >>> match_path('/users/{user_id}', '/users/not-integer')
      (True, {'user_id': 'not-integer'})