code: def __init__(
      self,
      *,
      max_node_iloc,
      source_ilocs,
      rel_ilocs,
      target_ilocs,
      batch_size,
      shuffle,
      negative_samples,
      sample_strategy,
      seed,
  ):
      self.max_node_iloc = max_node_iloc
  
      num_edges = len(source_ilocs)
      self.indices = np.arange(
          num_edges, dtype=np.min_scalar_type(num_edges)
      )
  
      self.source_ilocs = np.asarray(source_ilocs)
      self.rel_ilocs = np.asarray(rel_ilocs)
      self.target_ilocs = np.asarray(target_ilocs)
  
      self.negative_samples = negative_samples
      self.sample_strategy = sample_strategy
  
      self.batch_size = batch_size
      self.seed = seed
  
      self.shuffle = shuffle
  
      _, self._global_rs = random_state(seed)
      self._batch_sampler = SeededPerBatch(
          np.random.RandomState,
          self._global_rs.randint(2**32, dtype=np.uint32),
      )
  
file_path: stellargraph/stellargraph/mapper/knowledge_graph.py
imports: import threading
  import numpy
  import pandas
  from tensorflow.keras.utils import Sequence
  from ..globalvar import SOURCE, TARGET, TYPE_ATTR_NAME
  from ..random import random_state, SeededPerBatch
  from .base import Generator
  from ..core.validation import comma_sep, require_integer_in_range
label_desc: Use image node_id 1 to create a new KGTripleSequence object from inherited base classes: Sequence with example: obj = KGTripleSequence()