code: def remove_excessive_flags(cmd):
      flags = []
      for flag in cmd:
          if not flag.endswith(".ios.interface") and not flag.endswith(
              ".pkg.fake"
          ):
              flags.append(flag)
      return flags
  
file_path: catboost/build/scripts/link_exe.py
imports: import sys
  import subprocess
  import optparse
  import process_command_files
  from process_whole_archive_option import ProcessWholeArchiveOption
label_desc: Use image node_id 2 for calling a global function with example usage: remove_excessive_flags(cmd) and returns: flags