code: def get_direct_history(results_file_name):
      """Reads the optimisation history from the direct results file."""
      curr_opt_vals = []
      query_vals = []
      query_points = []
      results_file_handle = open(results_file_name, "r")
      for line in results_file_handle.readlines():
          words = line.strip().split()
          if words[0].isdigit():
              curr_opt_vals.append(float(words[1]))
              query_vals.append(float(words[2]))
              query_points.append([float(w) for w in words[3:]])
      results_file_handle.close()
      return Namespace(
          curr_opt_vals=np.array(curr_opt_vals),
          query_vals=np.array(query_vals),
          query_points=np.array(query_points),
          curr_true_opt_vals=np.array(curr_opt_vals),
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from argparse import Namespace
  from datetime import datetime
  from warnings import warn
  import os
  import numpy
  from .general_utils import map_to_bounds
  from .doo import DOOFunction, pdoo_wrap
label_desc: Use image node_id 7 for calling a global function with example usage: get_direct_history(results_file_name) and returns: Namespace