class_docstr: :class:`KnowledgeBasedDataset` is based on :class:`~recbole.data.dataset.dataset.Dataset`,
  and load ``.kg`` and ``.link`` additionally.
  
  Entities are remapped together with ``item_id`` specially.
  All entities are remapped into three consecutive ID sections.
  
  - virtual entities that only exist in interaction data.
  - entities that exist both in interaction data and kg triplets.
  - entities only exist in kg triplets.
  
  It also provides several interfaces to transfer ``.kg`` features into coo sparse matrix,
  csr sparse matrix, :class:`DGL.Graph` or :class:`PyG.Data`.
  
  Attributes:
      head_entity_field (str): The same as ``config['HEAD_ENTITY_ID_FIELD']``.
  
      tail_entity_field (str): The same as ``config['TAIL_ENTITY_ID_FIELD']``.
  
      relation_field (str): The same as ``config['RELATION_ID_FIELD']``.
  
      entity_field (str): The same as ``config['ENTITY_ID_FIELD']``.
  
      kg_feat (pandas.DataFrame): Internal data structure stores the kg triplets.
          It's loaded from file ``.kg``.
  
      item2entity (dict): Dict maps ``item_id`` to ``entity``,
          which is loaded from  file ``.link``.
  
      entity2item (dict): Dict maps ``entity`` to ``item_id``,
          which is loaded from  file ``.link``.
  
  Note:
      :attr:`entity_field` doesn't exist exactly. It's only a symbol,
      representing entity features.
  
      ``[UI-Relation]`` is a special relation token.
code: def _get_field_from_config(self):
      super()._get_field_from_config()
  
      self.head_entity_field = self.config["HEAD_ENTITY_ID_FIELD"]
      self.tail_entity_field = self.config["TAIL_ENTITY_ID_FIELD"]
      self.relation_field = self.config["RELATION_ID_FIELD"]
      self.entity_field = self.config["ENTITY_ID_FIELD"]
      self.kg_reverse_r = self.config["kg_reverse_r"]
      self.entity_kg_num_interval = self.config[
          "entity_kg_num_interval"
      ]
      self.relation_kg_num_interval = self.config[
          "relation_kg_num_interval"
      ]
      self._check_field(
          "head_entity_field",
          "tail_entity_field",
          "relation_field",
          "entity_field",
      )
      self.set_field_property(
          self.entity_field, FeatureType.TOKEN, FeatureSource.KG, 1
      )
  
      self.logger.debug(
          set_color("relation_field", "blue")
          + f": {self.relation_field}"
      )
      self.logger.debug(
          set_color("entity_field", "blue") + f": {self.entity_field}"
      )
  
imports: import os
  from collections import Counter
  import numpy
  import pandas
  import torch
  from scipy.sparse import coo_matrix
  from recbole.data.dataset import Dataset
  from recbole.utils import FeatureSource, FeatureType, set_color
  from recbole.utils.url import decide_download, download_url, extract_zip
label_desc: Use image node_id 2 for calling the KnowledgeBasedDataset obj's underlying member method code with example usage: obj._get_field_from_config() without return types