def METHOD_NAME(self, headers: Headers) -> str:
    content_type = headers.get("content-type")
    if content_type:
        mimetype, ct_params = parse_options_header(content_type)
        return ct_params.get("charset", self.charset)
    return self.charset