Project: s41467-024-45733-x | Function: get_models_2D (python)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** Deep convolutional neural network architecture for AI-CTRCD model predicting cardiotoxicity from ECG

**KEY TERMS:** {
  "SHAPE": "input ECG shape (2500, 12, 1)",
  "initial_kernel_num": "base number of kernels (64)",
  "multi_conv2D": "residual convolutional blocks",
  "MaxPooling2D": "downsampling layers",
  "GlobalAveragePooling2D": "global feature aggregation",
  "Dense": "final classification layer"
}

**CONTEXT CODE:** import tensorflow as tf
import tensorflow.keras as ks
from tensorflow.keras.layers import Add, Activation, Dropout, Dense, Conv2D, BatchNormalization, MaxPooling2D, Concatenate, Input, GlobalAveragePooling2D
from tensorflow.keras import Model
from tensorflow.keras.optimizers import RMSprop
import numpy as np
import pandas as pd


# testECG = np.load('ValidationECGs.npy')  # The file that contains the ECG data - commented for testing


def multi_conv2D(x,num_kernel,activation="relu"):  # Defines a 2D convolutional module based on ResidualNet
    # MASKED: Multi-branch 2D convolutional module based on ResNet architecture for ECG feature extraction implementation
    raise NotImplementedError("This function is masked for testing purposes.")

SHAPE = (2500, 12, 1)  ## The input shape of the ECG data

def get_models_2D():  # Returns the model structure
    # MASKED: Deep convolutional neural network architecture for AI-CTRCD model predicting cardiotoxicity from ECG implementation
    raise NotImplementedError("This function is masked for testing purposes.")


# Code below is commented out for testing
# model = get_models_2D()
# model.load_weights('weights.hdf5')
# y_pred_val = model_best.predict(testECG, batch_size=30, verbose=1)
# print(y_pred_val)





Complete the function implementation replacing "raise NotImplementedError".