code: def replace_line(lines, regexp, new_line):
      """
      Replace a line that matches 'regexp'
      """
      for iline, line in enumerate(lines):
          match_result = re.search(regexp, line)
          if match_result is not None:
              break
      updated_lines = lines[:]
      updated_lines[iline] = new_line
      return updated_lines
  
imports: import os
  import tempfile
  import itertools
  import shutil
  import re
  from invoke import task, run
  from subprocess import call
  import semver
label_desc: Use image node_id 13 for calling a global function with example usage: replace_line(lines, regexp, new_line) and returns: updated_lines