def _purge_headers_cb(headers):
header_list = []<EOL>for item in headers:<EOL><INDENT>if not isinstance(item, tuple):<EOL><INDENT>item = (item, None)<EOL><DEDENT>header_list.append(item[<NUM_LIT:0>:<NUM_LIT:2>])  <EOL><DEDENT>def before_record_response_cb(response):<EOL><INDENT>"""<STR_LIT>"""<EOL>for (header, value) in header_list:<EOL><INDENT>with suppress(KeyError):<EOL><INDENT>if value:<EOL><INDENT>response['<STR_LIT>'][header] = value<EOL><DEDENT>else:<EOL><INDENT>del response['<STR_LIT>'][header]<EOL><DEDENT><DEDENT><DEDENT>return response<EOL><DEDENT>return before_record_response_cb<EOL>
Remove headers from the response.

    Args:
        headers (list): headers to remove from the response

    Returns:
        callable: for been used in before_record_response VCR constructor.