def _parse_collection(parse_method, baseurl, backend_config):
    """Return a method that binds a parse method, a baseurl, and a backend config to a method that
    accepts name and path of a partition belonging to a collection.  The method should then return
    the name and the parsed partition data.
    """
    def parse(name_relative_path_or_url_tuple):
        name, relative_path_or_url = name_relative_path_or_url_tuple

        partition = parse_method(relative_path_or_url, baseurl, backend_config)
        partition._name_or_url = relative_path_or_url

        return name, partition

    return parse