code: def __generate_random_weights(self, weights):
      # weights: a list of ndarray; weights from keras
      # Randomly generate a new list with the same shape to serve as the new weights for testing
      new_weights = []
      for weight in weights:
          new_weights.append(np.random.random(list(weight.shape)))
      return new_weights
  
imports: from __future__ import print_function
  import numpy
  from keras.models import Sequential, Model
  from keras.layers.core import *
  from keras.layers.convolutional import *
  from keras.layers import Dense, Dropout, Input
  from keras.optimizers import RMSprop
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.keras.converter import *
  from bigdl.dllib.keras.converter import WeightLoader, WeightsConverter
  import numpy
  from unittest import TestCase
  import keras
  from bigdl.dllib.nn.keras.keras_utils import *
label_desc: Use image node_id 8 for calling the BigDLTestCase obj's underlying member method code with example usage: obj.__generate_random_weights(weights) and returns: new_weights