class_docstr: :class:`KnowledgeBasedDataLoader` is used for knowledge based model.
  It has three states, which is saved in :attr:`state`.
  In different states, :meth:`~_next_batch_data` will return different :class:`~recbole.data.interaction.Interaction`.
  Detailed, please see :attr:`~state`.
  
  Args:
      config (Config): The config of dataloader.
      dataset (Dataset): The dataset of dataloader.
      sampler (Sampler): The sampler of dataloader.
      kg_sampler (KGSampler): The knowledge graph sampler of dataloader.
      shuffle (bool, optional): Whether the dataloader will be shuffle after a round. Defaults to ``False``.
  
  Attributes:
      state (KGDataLoaderState):
          This dataloader has three states:
              - :obj:`~recbole.utils.enum_type.KGDataLoaderState.RS`
              - :obj:`~recbole.utils.enum_type.KGDataLoaderState.KG`
              - :obj:`~recbole.utils.enum_type.KGDataLoaderState.RSKG`
  
          In the first state, this dataloader would only return the triplets with negative
          examples in a knowledge graph.
          In the second state, this dataloader would only return the user-item interaction.
          In the last state, this dataloader would return both knowledge graph information
          and user-item interaction information.
class_docstr_tok: [":","class",":","`","KnowledgeBasedDataLoader","`","is","used","for","knowledge","based","model",".","It","has","three","states",",","which","is","saved","in",":","attr",":","`","state","`",".","In","different","states",",",":","meth",":","`","~_next_batch_data","`","will","return","different",":","class",":","`","~recbole.data.interaction.Interaction","`",".","Detailed",",","please","see",":","attr",":","`","~state","`",".","Args",":","config","(","Config",")",":","The","config","of","dataloader",".","dataset","(","Dataset",")",":","The","dataset","of","dataloader",".","sampler","(","Sampler",")",":","The","sampler","of","dataloader",".","kg_sampler","(","KGSampler",")",":","The","knowledge","graph","sampler","of","dataloader",".","shuffle","(","bool",",","optional",")",":","Whether","the","dataloader","will","be","shuffle","after","a","round",".","Defaults","to","``","False","``",".","Attributes",":","state","(","KGDataLoaderState",")",":","This","dataloader","has","three","states",":","-",":","obj",":","`","~recbole.utils.enum_type.KGDataLoaderState.RS","`","-",":","obj",":","`","~recbole.utils.enum_type.KGDataLoaderState.KG","`","-",":","obj",":","`","~recbole.utils.enum_type.KGDataLoaderState.RSKG","`","In","the","first","state",",","this","dataloader","would","only","return","the","triplets","with","negative","examples","in","a","knowledge","graph",".","In","the","second","state",",","this","dataloader","would","only","return","the","user-item","interaction",".","In","the","last","state",",","this","dataloader","would","return","both","knowledge","graph","information","and","user-item","interaction","information","."]
code: def update_config(self, config):
      self.general_dataloader.update_config(config)
      self.kg_dataloader.update_config(config)
  
file_path: RecBole/recbole/data/dataloader/knowledge_dataloader.py
imports: from logging import getLogger
  from recbole.data.dataloader.abstract_dataloader import AbstractDataLoader
  from recbole.data.dataloader.general_dataloader import TrainDataLoader
  from recbole.data.interaction import Interaction
  from recbole.utils import InputType, KGDataLoaderState
  import numpy
label_desc: Use image node_id 2 for calling the KnowledgeBasedDataLoader obj's underlying member method code with example usage: obj.update_config(config) without return types