docstr: 随机插入 Asoc，类别从 asoc_label_list 中自动选择
  
  Args:
      spot_asoc ([type]): [description]
      asoc_label_list ([type], optional): [description]. Defaults to None.
  
  Returns:
      [type]: [description]
docstr_tok: ["\u968f\u673a\u63d2\u5165","Asoc\uff0c\u7c7b\u522b\u4ece","asoc_label_list","\u4e2d\u81ea\u52a8\u9009\u62e9","Args",":","spot_asoc","(","[","type","]",")",":","[","description","]","asoc_label_list","(","[","type","]",",","optional",")",":","[","description","]",".","Defaults","to","None",".","Returns",":","[","type","]",":","[","description","]"]
code: def random_insert_asoc(self, spot_asoc, asoc_label_list=None):
      """随机插入 Asoc，类别从 asoc_label_list 中自动选择
  
      Args:
          spot_asoc ([type]): [description]
          asoc_label_list ([type], optional): [description]. Defaults to None.
  
      Returns:
          [type]: [description]
      """
      if asoc_label_list is None or len(asoc_label_list) == 0:
          return spot_asoc
      # asoc_sum = sum([len(x['asoc']) for x in spot_asoc])
      spot_sum = len(spot_asoc)
      random_num = sum(
          np.random.binomial(1, self.asoc_noise_ratio, spot_sum)
      )
      for _ in range(random_num):
          random_label = np.random.choice(asoc_label_list)
          spot_position = np.random.randint(low=0, high=len(spot_asoc))
          asoc_position = np.random.randint(
              low=0, high=len(spot_asoc[spot_position]["asoc"]) + 1
          )
          spot_asoc[spot_position]["asoc"].insert(
              asoc_position, (random_label, self.null_span)
          )
      return spot_asoc
  
file_path: DeepKE/src/deepke/name_entity_re/cross/extraction/noiser/spot_asoc_noiser.py
imports: from ...extraction import constants
  from dataclasses import dataclass
  import numpy
  from ...extraction.utils import *
label_desc: Use image node_id 2 for calling the SpotAsocNoiser obj's underlying member method code with example usage: obj.random_insert_asoc(spot_asoc, asoc_label_list) and returns: spot_asoc, spot_asoc