code: def latin_hc_sampling(dim, num_samples):
      """Latin Hyper-cube sampling in the unit hyper-cube."""
      if num_samples == 0:
          return np.zeros((0, dim))
      elif num_samples == 1:
          return 0.5 * np.ones((1, dim))
      lhs_lower_boundaries = (
          np.linspace(0, 1, num_samples + 1)[:num_samples]
      ).reshape(1, -1)
      width = lhs_lower_boundaries[0][1] - lhs_lower_boundaries[0][0]
      lhs_lower_boundaries = np.repeat(
          lhs_lower_boundaries, dim, axis=0
      ).T
      lhs_indices = latin_hc_indices(dim, num_samples)
      lhs_sample_boundaries = []
      for i in range(num_samples):
          curr_idx = lhs_indices[i]
          curr_sample_boundaries = [
              lhs_lower_boundaries[curr_idx[j]][j] for j in range(dim)
          ]
          lhs_sample_boundaries.append(curr_sample_boundaries)
      lhs_sample_boundaries = np.array(lhs_sample_boundaries)
      uni_random_width = width * np.random.random((num_samples, dim))
      lhs_samples = lhs_sample_boundaries + uni_random_width
      return lhs_samples
  
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 12 for calling a global function with example usage: latin_hc_sampling(dim, num_samples) and returns: lhs_samples, np, unknown