code: def load_from_ntriples(
      folder_name, file_name, data_home=None, add_reciprocal_rels=False
  ):
      """Load a dataset of RDF ntriples.
  
      Loads an RDF knowledge graph serialized as ntriples, without building an RDF graph in memory.
      This function should be preferred over ``load_from_rdf()``, since it does not load the graph into an rdflib
      model (and it is therefore faster by order of magnitudes).
      Nevertheless, it requires a ntriples_ serialization as in the example below:
  
      .. _ntriples: https://www.w3.org/TR/n-triples/.
  
      .. code-block:: text
  
          _:alice <http://xmlns.com/foaf/0.1/knows> _:bob .
          _:bob <http://xmlns.com/foaf/0.1/knows> _:alice .
  
      .. hint::
          To split a generic knowledge graphs into **training**, **validation**, and **test** sets do not use the above
          function, but rather :meth:`~ampligraph.evaluation.protocol.train_test_split_no_unseen`: this will return
          validation and test sets not including triples with entities not present in the training set.
  
  
      Parameters
      ----------
      folder_name: str
          Base folder where the file is stored.
      file_name: str
          File name.
      data_home: str
         The path to the folder that contains the datasets.
      add_reciprocal_rels: bool
          Flag which specifies whether to add reciprocal relations. For every <s, p, o> in the dataset
          this creates a corresponding triple with reciprocal relation <o, p_reciprocal, s> (default: `False`).
  
      Returns
      -------
          triples: ndarray, shape (n, 3)
              The actual triples of the file.
      """
  
      logger.debug("Loading rdf ntriples from {}.".format(file_name))
      data_home = _get_data_home(data_home)
      df = pd.read_csv(
          os.path.join(data_home, folder_name, file_name),
          sep=" ",
          header=None,
          names=None,
          dtype=str,
          usecols=[0, 1, 2],
      )
  
      # Remove trailing full stop (if present)
      df[2] = df[2].apply(lambda x: x.rsplit(".", 1)[0])
  
      if add_reciprocal_rels:
          df = _add_reciprocal_relations(df)
  
      return df.values
  
imports: import hashlib
  import json
  import logging
  import os
  import urllib
  import zipfile
  from collections import namedtuple
  from pathlib import Path
  import numpy
  import pandas
label_desc: Use image node_id 20 for calling a global function with example usage: load_from_ntriples(folder_name, file_name, data_home, add_reciprocal_rels) and returns: df