code: def rand(size, a, b, decimals=4):
      res = np.random.random_sample(size) * (b - a) + a
      if decimals is not None:
          return np.around(res, decimals=decimals)
      return res
  
imports: import random
  import os
  import sys
  import collections
  import itertools
  import pickle
  import scipy.sparse
  import networkx
  import numpy
  from sklearn.cluster import SpectralClustering
  from sklearn import gaussian_process
  from scipy.optimize import minimize
  from bayes_opt import BayesianOptimization
label_desc: Use image node_id 1 for calling a global function with example usage: rand(size, a, b, decimals) and returns: res, np