def parse(pattern, string, custom_types=None, includes=None):
    """
    Try to match the pattern to the string, returning
    a dictionary of values pulled from the string.
    This raises a SparserValueError on no match

    :param str patt:
    :param str string:
    :param {type_name: (regex, cb)} custom_types:
    :param {include_name: include_pattern, ...} includes:
    :rtype: dict
    """
    compiled = compile(pattern, custom_types, includes)
    ret = compiled.parse(string)
    return ret
