code: def generate_1d_gaussian_rfs(
      n_voxels,
      feature_resolution,
      feature_range,
      rf_size=15,
      random_tuning=True,
      rf_noise=0.0,
  ):
      """
      Creates a numpy matrix of Gaussian-shaped voxel receptive fields (RFs)
      along one dimension. Can specify whether they are evenly tiled or randomly
      tuned along the axis. RF range will be between 0 and 1.
  
      Parameters
      ----------
  
      n_voxels : int
          Number of voxel RFs to create.
  
      feature_resolution : int
          Number of points along the feature axis.
  
      feature_range : tuple (numeric)
          A tuple indicating the start and end values of the feature range. e.g.
          (0, 359) for motion directions.
  
      rf_size : numeric
          Width of the Gaussian receptive field. Should be given in units of the
          feature dimension. e.g., 15 degrees wide in motion direction space.
  
      random_tuning : boolean [default True]
          Indicates whether or not the voxels are randomly tuned along the 1D
          feature axis or whether tuning is evenly spaced.
  
      rf_noise : float [default 0.]
          Amount of uniform noise to add to the Gaussian RF. This will cause the
          generated responses to be distorted by the same uniform noise for a
          given voxel.
  
      Returns
      ----------
  
      voxel_rfs : 2d numpy array (float)
          The receptive fields in feature space. Dimensions are n_voxels by
          feature_resolution.
  
      voxel_tuning : 1d numpy array (float)
          The centers of the voxel RFs, in feature space.
  
      """
      range_start, range_stop = feature_range
      if random_tuning:
          # Voxel selectivity is random
          voxel_tuning = np.floor(
              (np.random.rand(n_voxels) * range_stop) + range_start
          ).astype(int)
      else:
          # Voxel selectivity is evenly spaced along the feature axis
          voxel_tuning = np.linspace(
              range_start, range_stop, n_voxels + 1
          )
          voxel_tuning = voxel_tuning[0:-1]
          voxel_tuning = np.floor(voxel_tuning).astype(int)
      gaussian = signal.gaussian(feature_resolution, rf_size)
      voxel_rfs = np.zeros((n_voxels, feature_resolution))
      for i in range(0, n_voxels):
          voxel_rfs[i, :] = np.roll(
              gaussian,
              voxel_tuning[i] - ((feature_resolution // 2) - 1),
          )
      voxel_rfs += (
          np.random.rand(n_voxels, feature_resolution) * rf_noise
      )
      voxel_rfs = voxel_rfs / np.max(voxel_rfs, axis=1)[:, None]
  
      return voxel_rfs, voxel_tuning
  
imports: import logging
  from itertools import product
  from statsmodels.tsa.arima.model import ARIMA
  import math
  import numpy
  from numpy.linalg import LinAlgError
  from pkg_resources import resource_stream
  from scipy import stats
  from scipy import signal
  import scipy.ndimage
  import copy
  from scipy import optimize
label_desc: Use image node_id 28 for calling a global function with example usage: generate_1d_gaussian_rfs(n_voxels, feature_resolution, feature_range, rf_size, random_tuning, rf_noise) and returns: voxel_rfs,  voxel_tuning