code: def replace_vw_command(self):
      # restore original command in case it changed
      # but add new field to the test with the original vw command
      self.test.command_line = self.stashed_vw_command
      self.test.stashed_command_line = self.stashed_vw_command
  
      # remove json/dsjson since we are adding --flatbuffer
      json_args = ["--json", "--dsjson"]
      if "--dsjson" in self.test.command_line:
          json_args.append("--chain_hash")
      self.test.command_line = self.remove_arguments(
          self.test.command_line, json_args, flags=True
      )
  
      # replace data files with flatbuffer ones in vw_command
      for i, from_file, to_file in self.files_to_be_converted:
          self.test.command_line = self.test.command_line.replace(
              from_file, to_file
          )
      # add --flatbuffer argument
      self.test.command_line = self.test.command_line + " --flatbuffer"
  
imports: import copy
  import os
  import os.path
  import shlex
  import subprocess
  from pathlib import Path
  import re
  from typing import List, Optional, Tuple
  from run_tests_common import TestData
label_desc: Use image node_id 8 for calling the FlatbufferTest obj's underlying member method code with example usage: obj.replace_vw_command() without return types