You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: problem.rs
    path of file: ./repos/AtCoderProblems/atcoder-problems-backend/atcoder-client/src/atcoder
    
    the code of the file until where you have to start completion: use anyhow::{Context, Result};

use super::AtCoderProblem;

use scraper::{Html, Selector};

pub(super) fn scrape(html: &str, contest_id: &str) -> Result<Vec<AtCoderProblem>> {
    Html::parse_document(html)
        .select(&Selector::parse("tbody").unwrap())
        .next()
        .context("Failed to parse html.")?
        .select(&Selector::parse("tr").unwrap())
        .map(|tr| {
            let selector = Selector::parse("td").unwrap();
            let mut tds = tr.select(&selector);
            let position = tds
                .next()
                .context("Failed to parse html.")?
                .text()
                .next()
                .context("Failed to parse html.")?
                .to_owned();
            let problem = tds.next().context("Failed to parse html.")?;
            let id = problem
                .select(&Selector::parse("a").unwrap())
                .next()
                .context("Failed t
    
    fn test_scrape() {
        let contents = include_str!("../../test_resources/abc107_tasks");
        let problems = scrape(contents, "abc107").unwrap();
        assert_eq!(
            problems,
            vec![
                AtCoderProblem {
                    id: "abc107_a".to_owned(),
                    contest_id: "abc107".to_owned(),
                    title: "Train".to_owned(),
                    position: "A".to_owned()
                },
                AtCoderProblem {
                    id: "abc107_b".to_owned(),
                    contest_id: "abc107".to_owned(),
                    title: "Grid Compression".to_owned(),
                    position: "B".to_owned()
                },
                AtCoderProblem {
                    id: "arc101_a".to_owned(),
                    contest_id: "abc107".to_owned(),
                    title: "Candles".to_owned(),
                    position: "C".to_owned()
                },
                AtCoderProblem {
                    id: "arc101_b".to_owned(),
                    contest_id: "abc107".to_owned(),
                    title: "Median of Medians".to_owned(),
                    position: "D".to_owned()
                }
            ]
        );
    }