code: def replace_file_header(self, old_header, new_header):
      if old_header is None:
          she_bang = self.extract_shebang()
          if she_bang is None:
              replaced_text = new_header + "\n" + self.text
          else:
              text = self.text.replace(she_bang + "\n", "")
              replaced_text = she_bang + "\n" + new_header + "\n" + text
      else:
          replaced_text = self.text.replace(old_header, new_header)
  
      return replaced_text
  
imports: import argparse
  import os
  import pathlib
  import re
  import subprocess
  from tqdm import tqdm
  from contextlib import contextmanager
label_desc: Use image node_id 8 for calling the Checker obj's underlying member method code with example usage: obj.replace_file_header(old_header, new_header) and returns: replaced_text