import requests
from datetime import datetime


def get_last_modified(response: requests.Response) -> datetime:
    """
    Get the Last-Modified header info as a datetime object
    """
    return datetime.strptime(
        response.headers["Last-Modified"], "%a, %d %b %Y %H:%M:%S %Z"
    )