code: def make_test_globals():
      """Prepare global objects used in the doctests"""
      print("Prepare doctest globals", flush=True)
      # Test using a small data sample of 10000 random integers 0-255
      # with 16 dimensions
      hsne_data = np.random.randint(256, size=(10000, 16))
      tsne_data = np.random.randint(256, size=(2000, 16))
      # Create a sample hsne with 3 levels and
      # save this to a sample file
      hsne = nptsne.HSne(True)
      hsne.create_hsne(hsne_data, 3)
      file_name = "rnd10000x16.hsne"
      hsne.save(file_name)
      top_analysis = nptsne.hsne_analysis.Analysis(
          hsne, nptsne.hsne_analysis.EmbedderType.CPU
      )
  
      print("End prepare doctest globals", flush=True)
      return {
          "sample_hsne": hsne,
          "sample_analysis": top_analysis,
          "sample_scale0": hsne.get_scale(0),
          "sample_scale1": hsne.get_scale(1),
          "sample_scale2": hsne.get_scale(2),
          "sample_hsne_file": file_name,
          "sample_hsne_data": hsne_data,
          "sample_tsne_data": tsne_data,
          "sample_texture_tsne": nptsne.TextureTsne(),
          "sample_texture_tsne_extended": nptsne.TextureTsneExtended(),
      }
  
file_path: nptsne/test/run_doctest.py
imports: import doctest
  from doctest import REPORT_NDIFF, ELLIPSIS
  from doctest import DocTestRunner
  import numpy
  import nptsne
  import nptsne.hsne_analysis
  import nptsne.libs._nptsne
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: make_test_globals() and returns: dict