code: def rename(
      self,
      sample_id_name=None,
      match_id_name=None,
      label_name=None,
      weight_name=None,
      columns: dict = None,
  ):
      attr_dict = {
          "sample_id_name": sample_id_name,
          "match_id_name": match_id_name,
          "label_name": label_name,
          "weight_name": weight_name,
      }
  
      for attr, value in attr_dict.items():
          if not value:
              continue
          o_name = getattr(self._schema, attr)
          setattr(self._schema, attr, value)
          self._rename_single_column(o_name, value)
  
      if columns:
          for o_name, n_name in columns.items():
              self._rename_single_column(o_name, n_name)
  
          o_columns = self._schema.columns.tolist()
          n_columns = [
              o_name if o_name not in columns else columns[o_name]
              for o_name in o_columns
          ]
          self._schema.columns = pd.Index(n_columns)
  
imports: import copy
  from typing import List, Union
  import pandas
  from .utils import AnonymousGenerator
label_desc: Use image node_id 4 for calling the SchemaManager obj's underlying member method code with example usage: obj.rename(sample_id_name, match_id_name, label_name, weight_name, columns) without return types