class_docstr: Sample negative spot and asoc to construct SSI
class_docstr_tok: ["Sample","negative","spot","and","asoc","to","construct","SSI"]
code: def __init__(
      self,
      tokenizer: PreTrainedTokenizerBase,
      schema: RecordSchema,
      positive_rate=1,
      negative=5,
      ordered_prompt=False,
  ) -> None:
      self.spot_dict = self.get_ordered_dict(
          schema.type_list, tokenizer
      )
      self.asoc_dict = self.get_ordered_dict(
          schema.role_list, tokenizer
      )
      self.spot_list = list(self.spot_dict.keys())
      self.asoc_list = list(self.asoc_dict.keys())
      self.spot_prompt = tokenizer.get_vocab()[spot_prompt]
      self.asoc_prompt = tokenizer.get_vocab()[asoc_prompt]
      self.text_start = tokenizer.get_vocab()[text_start]
      self.positive_rate = (
          positive_rate
          if positive_rate > 0 and positive_rate < 1
          else 1
      )
      self.negative = negative
      self.ordered_prompt = ordered_prompt
      logger.info(
          f"Meta Sample, Negative: {self.negative}, Ordered Prompt: {self.ordered_prompt}"
      )
  
imports: import os
  from dataclasses import dataclass
  import torch
  import logging
  import random
  import math
  from typing import Optional, Union
  from collections import OrderedDict
  from transformers import PreTrainedTokenizerBase, PreTrainedModel
  from transformers.file_utils import PaddingStrategy
  from ...extraction.record_schema import RecordSchema
  from ...extraction.dataset_processer import spot_prompt, asoc_prompt
  from ...extraction.constants import BaseStructureMarker, text_start
  from ...extraction.utils import convert_to_record_function
  from ...extraction.noiser.spot_asoc_noiser import SpotAsocNoiser
label_desc: Use image node_id 1 to create a new DynamicSSIGenerator object  with example: obj = DynamicSSIGenerator(tokenizer, schema, positive_rate, negative, ordered_prompt)