code: def replace_tags(self, tags_to_remove, tags_to_add):
      cmd = ["tag", "replace", "--run-id", self.run_id]
      for tag_to_remove in tags_to_remove:
          cmd.extend(["--remove", tag_to_remove])
      for tag_to_add in tags_to_add:
          cmd.extend(["--add", tag_to_add])
      self.run_cli(cmd)
  
imports: import sys
  import subprocess
  import json
  from collections import namedtuple
  from tempfile import NamedTemporaryFile
  from metaflow.includefile import IncludedFile
  from metaflow.util import is_stringish
  from .None import MetaflowCheck, AssertArtifactFailed, AssertLogFailed, truncate, AssertCardFailed
label_desc: Use image node_id 18 for calling the CliCheck obj's underlying member method code with example usage: obj.replace_tags(tags_to_remove, tags_to_add) without return types