class_docstr: Sample negative spot and asoc to construct SSI
class_docstr_tok: ["Sample","negative","spot","and","asoc","to","construct","SSI"]
docstr: Sample spot
          
docstr_tok: ["Sample","spot"]
code: def sample_spot(self, positive):
      """Sample spot"""
      negative_spot = self.sample_negative(
          postive=positive, candidates=self.spot_list, k=self.negative
      )
      positive_spot = random.sample(
          positive, math.floor(len(positive) * self.positive_rate)
      )
  
      prefix_spot_candidates = positive_spot + negative_spot
      converted_spot_prefix = self.convert_prefix(
          candidates=prefix_spot_candidates,
          prompt=self.spot_prompt,
          mapper=self.spot_dict,
          ordered_prompt=self.ordered_prompt,
      )
  
      return converted_spot_prefix, positive_spot, negative_spot
  
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 4 for calling the DynamicSSIGenerator obj's underlying member method code with example usage: obj.sample_spot(positive) and returns: converted_spot_prefix,  positive_spot,  negative_spot