code: def test_model_in_model(self):
      np.random.seed(123)
      inputs = np.random.uniform(size=(8, 32, 32, 1))
      nested_model = create_network_with_one_subnet()
  
      # will get the activations of every layer, EXCLUDING subnet layers.
      acts_not_nested = keract.get_activations(nested_model, inputs)
      self.assertTrue("subnet" in acts_not_nested)
      self.assertTrue("subnet/conv2d" not in acts_not_nested)
  
      # will get the activations of every layer, including subnet.
      acts_nested = keract.get_activations(
          nested_model, inputs, nested=True
      )
      self.assertTrue("subnet" not in acts_nested)
      self.assertTrue("subnet/conv2d" in acts_nested)
      self.assertTrue("subnet/max_pooling2d" in acts_nested)
      self.assertTrue("subnet/conv2d_1" in acts_nested)
      self.assertTrue("subnet/max_pooling2d_1" in acts_nested)
  
imports: import unittest
  import numpy
  import tensorflow
  import tensorflow.keras.backend
  from tensorflow import keras
  from tensorflow.keras import Model, Input
  from tensorflow.keras.layers import Add
  from tensorflow.keras.layers import ReLU, concatenate
  from tensorflow.keras.layers import TimeDistributed, Dense, Embedding, LSTM
  from keract import get_activations, get_gradients_of_activations, get_gradients_of_trainable_weights, keract
label_desc: Use image node_id 15 for calling the GetActivationsTest obj's underlying member method code with example usage: obj.test_model_in_model() without return types