class_docstr: Unit tests for the NNModifier class. 
class_docstr_tok: ["Unit","tests","for","the","NNModifier","class","."]
docstr: Tests multi step modifications. 
docstr_tok: ["Tests","multi","step","modifications","."]
code: def test_multi_step_modifications(self):
      """Tests multi step modifications."""
      num_steps = 4
      self.report("Testing %d-step modifications." % (num_steps))
      num_modifications = 20
      save_dir = os.path.join(
          self.save_dir, "multi_step_%d" % (num_steps)
      )
      if os.path.exists(save_dir):
          rmtree(save_dir)
      # Now iterate through the test networks
      test_nns = self.cnns + self.mlps
      for idx, old_nn in enumerate(test_nns):
          save_prefix = str(idx)
          modifier, constraint_checker = self._get_modifier_and_cc(
              old_nn
          )
          get_modifications = (
              lambda arg_nn: modifier.get_multi_step_modifications(
                  arg_nn, num_steps, num_modifications
              )
          )
          run_orig_vs_modifications(
              save_dir,
              save_prefix,
              old_nn,
              get_modifications,
              constraint_checker,
              self.report,
          )
  
imports: from copy import deepcopy
  import numpy
  import os
  from shutil import rmtree
  import unittest
  from .None import nn_domains
  from .None import nn_modifiers
  from .neural_network import NeuralNetwork
  from .nn_visualise import visualise_nn
  from .unittest_neural_network import generate_cnn_architectures, generate_mlp_architectures
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 5 for calling the NNModifierTestCase obj's underlying member method code with example usage: obj.test_multi_step_modifications() without return types