code: def add_label_or_weight(self, key_type, name, block_type):
      (
          field_index,
          field_index_changes,
      ) = self._schema_manager.add_label_or_weight(
          key_type, name, block_type
      )
      self._block_manager.reset_block_field_indexes(field_index_changes)
      self._block_manager.append_fields(
          [field_index], block_type, should_compress=False
      )
  
imports: import numpy
  from .schema_manager import SchemaManager
  from .block_manager import BlockManager
  from .block_manager import BlockType
  import pandas
  from ..entity import types
  from typing import Union, List, Tuple
  from ..conf.default_config import DATAFRAME_BLOCK_ROW_SIZE
label_desc: Use image node_id 7 for calling the DataManager obj's underlying member method code with example usage: obj.add_label_or_weight(key_type, name, block_type) without return types