Is there a better way to write this code section in Python with an emphasis on memory usage?convert csv from UTF-8 to UTF-8-BOM ( work better with Hebrew )
def convert_csv_to_utf8_bom(input_file_path, output_file_path, logger: Logger):"""Convert a CSV file format to UTF 8 Bom """logger.debug(f"convert csv to utf8 bom")with open(input_file_path, "r", encoding="utf-8") as f: content = f.read()with open(output_file_path, "w", encoding="utf-8-sig") as f: f.write(content)