code: def init_model(model_scale=16):
      r"""
      Function to create model for EVAC+
  
      Parameters
      ----------
      model_scale : int, optional
          The scale of the model
          Should match the saved weights from fetcher
          Default is 16
  
      Returns
      -------
      model : tf.keras.Model
      """
      inputs = tf.keras.Input(shape=(128, 128, 128, 1))
      raw_input_2 = tf.keras.Input(shape=(64, 64, 64, 1))
      raw_input_3 = tf.keras.Input(shape=(32, 32, 32, 1))
      raw_input_4 = tf.keras.Input(shape=(16, 16, 16, 1))
      raw_input_5 = tf.keras.Input(shape=(8, 8, 8, 1))
      # Encode
      fwd1, x = Block(
          model_scale,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.2,
          n_layers=1,
      )(inputs, inputs)
  
      x = Concatenate()([x, raw_input_2])
  
      fwd2, x = Block(
          model_scale * 2,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=2,
      )(x, x)
  
      x = Concatenate()([x, raw_input_3])
  
      fwd3, x = Block(
          model_scale * 4,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=3,
      )(x, x)
  
      x = Concatenate()([x, raw_input_4])
  
      fwd4, x = Block(
          model_scale * 8,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=3,
      )(x, x)
  
      x = Concatenate()([x, raw_input_5])
  
      _, up = Block(
          model_scale * 16,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=3,
          layer_type="up",
      )(x, x)
  
      x = Concatenate()([fwd4, up])
  
      _, up = Block(
          model_scale * 8,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=3,
          layer_type="up",
      )(x, up)
  
      x = Concatenate()([fwd3, up])
  
      _, up = Block(
          model_scale * 4,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=3,
          layer_type="up",
      )(x, up)
  
      x = Concatenate()([fwd2, up])
  
      _, up = Block(
          model_scale * 2,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=2,
          layer_type="up",
      )(x, up)
  
      x = Concatenate()([fwd1, up])
  
      _, pred = Block(
          model_scale,
          kernel_size=5,
          strides=1,
          padding="same",
          drop_r=0.5,
          n_layers=1,
          layer_type="none",
      )(x, up)
  
      pred = Conv3D(2, 1, padding="same")(pred)
      output = Softmax(axis=-1)(pred)
  
      model = Model(
          {
              "input_1": inputs,
              "input_2": raw_input_2,
              "input_3": raw_input_3,
              "input_4": raw_input_4,
              "input_5": raw_input_5,
          },
          output[..., 0],
      )
      return model
  
imports: import logging
  import numpy
  from dipy.data import get_fnames
  from dipy.testing.decorators import doctest_skip_parser
  from dipy.utils.optpkg import optional_package
  from dipy.align.reslice import reslice
  from dipy.nn.utils import normalize, set_logger_level, transform_img
  from dipy.nn.utils import recover_img, correct_minor_errors
label_desc: Use image node_id 2 for calling a global function with example usage: init_model(model_scale) and returns: model