def extract_headers(response):
    """Extract relevant headers from a response into a dictionary."""
    result = {}

    for key in response.headers.keys():
        if isinstance(key, bytes):
            key = key.decode('utf-8')

        value = response.headers.get(key)

        if isinstance(value, bytes):
            value = value.decode('utf-8')

        if key in ('Date', 'Content-Length', 'Etag','Last-Modified'):
            continue

        result[key] = value

    return result