code: def _get_data_home(data_home=None):
      """Get the location of the dataset folder to use.
  
      Automatically determine the dataset folder to use.
      If ``data_home`` is provided, a check is performed to see if the path exists and creates one if it does not.
      If ``data_home`` is `None` the ``AMPLIGRAPH_ENV_NAME`` dataset is used.
      If ``AMPLIGRAPH_ENV_NAME`` is not set, the default environment ``~/ampligraph_datasets`` is used.
  
      Parameters
      ----------
  
      data_home: str
         The path to the folder that contains the datasets.
  
      Returns
      -------
  
      str
          The path to the dataset directory
  
      """
  
      if data_home is None:
          data_home = os.environ.get(
              AMPLIGRAPH_ENV_NAME,
              os.path.join("~", "ampligraph_datasets"),
          )
      data_home = os.path.expanduser(data_home)
      if not os.path.exists(data_home):
          os.makedirs(data_home)
      logger.debug("data_home is set to {}".format(data_home))
      return data_home
  
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 2 for calling a global function with example usage: _get_data_home(data_home) and returns: data_home