<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _process_configuration(comments):
 """Extract sampling information."""

    num_samples = None
    num_warmup = None
    save_warmup = None
    for comment in comments:
        comment = comment.strip("#").strip()
        if comment.startswith("num_samples"):
            num_samples = int(comment.strip("num_samples = ").strip("(Default)"))
        elif comment.startswith("num_warmup"):
            num_warmup = int(comment.strip("num_warmup = ").strip("(Default)"))
        elif comment.startswith("save_warmup"):
            save_warmup = bool(int(comment.strip("save_warmup = ").strip("(Default)")))
        elif comment.startswith("thin"):
            thin = int(comment.strip("thin = ").strip("(Default)"))

    return {
        "num_samples": num_samples,
        "num_warmup": num_warmup,
        "save_warmup": save_warmup,
        "thin": thin,
    }