docstr:        INPUT
           |
           v
          [t1]
           |
           v
           .
           .
           .
          [t500]
           |
           v
          RELU_1
           |
           v
           .
           .
           .
           |
           v
         [t1000]
           |
           v
          RELU_2
  tk are all identity
  Remove a sequence of 1000 identity transpose but with a RELU in the middle,
  the final output should be
         INPUT
           |
           v
          RELU_1
           |
           v
          RELU_2
docstr_tok: ["INPUT","|","v","[","t1","]","|","v",".",".",".","[","t500","]","|","v","RELU_1","|","v",".",".",".","|","v","[","t1000","]","|","v","RELU_2","tk","are","all","identity","Remove","a","sequence","of","1000","identity","transpose","but","with","a","RELU","in","the","middle",",","the","final","output","should","be","INPUT","|","v","RELU_1","|","v","RELU_2"]
code: def test_remove_thousands_identity_transpose_with_activation_between(
      self,
  ):
      """
             INPUT
               |
               v
              [t1]
               |
               v
               .
               .
               .
              [t500]
               |
               v
              RELU_1
               |
               v
               .
               .
               .
               |
               v
             [t1000]
               |
               v
              RELU_2
      tk are all identity
      Remove a sequence of 1000 identity transpose but with a RELU in the middle,
      the final output should be
             INPUT
               |
               v
              RELU_1
               |
               v
              RELU_2
  
      """
      input_shape = (1, 10, 5)
      input_features = [("data", datatypes.Array(*input_shape))]
      output_features = [("out", None)]
      builder = neural_network.NeuralNetworkBuilder(
          input_features,
          output_features,
          disable_rank5_shape_mapping=True,
      )
  
      num_layers = 1000
      input_name = "data"
      for i in range(num_layers):
          output_name = "layer_" + str(i) + "_output"
          name = "layer_" + str(i)
          builder.add_transpose(
              name=name,
              axes=[0, 1, 2],
              input_name=input_name,
              output_name=output_name,
          )
          input_name = output_name
          if i == num_layers / 2:
              builder.add_activation(
                  name="relu_inter",
                  non_linearity="ReLU",
                  input_name=input_name,
                  output_name="relu_out",
              )
              input_name = "relu_out"
      builder.add_activation(
          name="relu",
          non_linearity="RELU",
          input_name=input_name,
          output_name="out",
      )
      self._test_builder(builder, input_shape, 2)
  
imports: import copy
  import pytest
  import numpy
  import unittest
  from sys import platform
  from coremltools._deps import _IS_MACOS
  import coremltools.models.datatypes
  from coremltools.models.utils import _macos_version
  from coremltools.models import neural_network
  from coremltools.models import MLModel
  from coremltools.models.neural_network.printer import print_network_spec
  from coremltools.converters.mil.backend.nn.passes.mlmodel_passes import remove_disconnected_layers, transform_conv_crop, remove_redundant_transposes
label_desc: Use image node_id 7 for calling the Redundant_Transposees_Test obj's underlying member method code with example usage: obj.test_remove_thousands_identity_transpose_with_activation_between() without return types