code: def __init__(self, args):
      self.archiver = args[0]
      self.arch_type = args[1]
      self.llvm_ar_format = args[2]
      self.build_root = args[3]
      self.plugin = args[4]
      self.output = args[5]
      auto_input = args[6:]
  
      self.need_modify = False
      self.extra_args = []
  
      if self.arch_type.endswith("_AR"):
          if self.arch_type == "GNU_AR":
              self.create_flags = ["rcs"]
              self.modify_flags = ["-M"]
          elif self.arch_type == "LLVM_AR":
              self.create_flags = [
                  "rcs",
                  "--format=%s" % self.llvm_ar_format,
              ]
              self.modify_flags = ["-M"]
          self.need_modify = any(
              item.endswith(".a") for item in auto_input
          )
          if self.need_modify:
              self.objs = list(
                  filter(lambda x: x.endswith(".o"), auto_input)
              )
              self.libs = list(
                  filter(lambda x: x.endswith(".a"), auto_input)
              )
          else:
              self.objs = auto_input
              self.libs = []
          self.output_opts = [self.output]
      elif self.arch_type == "LIBTOOL":
          self.create_flags = ["-static"]
          self.objs = auto_input
          self.libs = []
          self.output_opts = ["-o", self.output]
      elif self.arch_type == "LIB":
          self.create_flags = []
          self.extra_args = list(
              filter(lambda x: x.startswith("/"), auto_input)
          )
          self.objs = list(
              filter(lambda x: not x.startswith("/"), auto_input)
          )
          self.libs = []
          self.output_opts = ["/OUT:" + self.output]
  
      self.plugin_flags = (
          ["--plugin", self.plugin] if self.plugin != "None" else []
      )
  
file_path: catboost/build/scripts/link_lib.py
imports: import sys
  import subprocess
  import tempfile
  import os
  import shutil
label_desc: Use image node_id 1 to create a new Opts object from inherited base classes: object with example: obj = Opts(args)