def _header_extension(self, remove_headers=[], add_or_modify_headers={}):
import string<EOL>import zipfile<EOL>plugin_file = '<STR_LIT>'<EOL>if remove_headers is None:<EOL><INDENT>remove_headers = []<EOL><DEDENT>if add_or_modify_headers is None:<EOL><INDENT>add_or_modify_headers = {}<EOL><DEDENT>if isinstance(remove_headers, list) is False:<EOL><INDENT>logger.error("<STR_LIT>")<EOL>return None<EOL><DEDENT>if isinstance(add_or_modify_headers, dict) is False:<EOL><INDENT>logger.error("<STR_LIT>")<EOL>return None<EOL><DEDENT>remove_headers = list(set(remove_headers))<EOL>manifest_json = """<STR_LIT>"""<EOL>background_js = string.Template("""<STR_LIT>"""<EOL>).substitute(remove_headers=remove_headers,<EOL>add_or_modify_headers=add_or_modify_headers,<EOL>)<EOL>with zipfile.ZipFile(plugin_file, '<STR_LIT:w>') as zp:<EOL><INDENT>zp.writestr("<STR_LIT>", manifest_json)<EOL>zp.writestr("<STR_LIT>", background_js)<EOL><DEDENT>return plugin_file<EOL>
Create modheaders extension

        Source: https://vimmaniac.com/blog/bangal/modify-and-add-custom-headers-in-selenium-chrome-driver/

        kwargs:
            remove_headers (list): headers name to remove
            add_or_modify_headers (dict): ie. {"Header-Name": "Header Value"}

        return str -> plugin path