code: def add_label_or_weight(self, key_type, name, block_type):
      self._type_mapping[name] = block_type.value
  
      src_field_names = self.get_field_name_list()
      if key_type == "label":
          self._schema.label_name = name
      else:
          self._schema.weight_name = name
  
      dst_field_names = self.get_field_name_list()
  
      name_offset_mapping = dict()
      offset_name_mapping = dict()
      field_index_changes = dict()
  
      for offset, field_name in enumerate(dst_field_names):
          name_offset_mapping[field_name] = offset
          offset_name_mapping[offset] = field_name
  
      for field_name in src_field_names:
          src_offset = self._name_offset_mapping[field_name]
          dst_offset = name_offset_mapping[field_name]
          field_index_changes[src_offset] = dst_offset
  
      self._name_offset_mapping = name_offset_mapping
      self._offset_name_mapping = offset_name_mapping
  
      return self._name_offset_mapping[name], field_index_changes
  
imports: import copy
  from typing import List, Union
  import pandas
  from .utils import AnonymousGenerator
label_desc: Use image node_id 6 for calling the SchemaManager obj's underlying member method code with example usage: obj.add_label_or_weight(key_type, name, block_type) and returns: self,  field_index_changes