# Replaced magic numbers with named constants
CLASS_WEIGHTS = [0.1, 0.4, 0.5]

# Added type hints for function parameters
def load_nifti(file_path: str) -> np.ndarray:
    ...

def preprocess_data(image: np.ndarray, label: np.ndarray) -> tuple:
    ...

def resize_slices(data: np.ndarray, target_height: int, target_width: int) -> np.ndarray:
    ...

def normalize_intensity(data: np.ndarray) -> np.ndarray:
    ...

# Removed redundant code
# def resize_slices(data: np.ndarray, target_height: int, target_width: int) -> np.ndarray:
#     ...

# Improved variable naming
TARGET_HEIGHT = 256
TARGET_WIDTH = 256

# Replaced magic numbers with named constants
model.compile(Adam(LEARNING_RATE), loss=sm.losses.DiceLoss(class_weights=np.array(CLASS_WEIGHTS)) + sm.losses.CategoricalFocalLoss(), metrics=['accuracy', sm.metrics.IOUScore(threshold=0.5), sm.metrics.FScore(threshold=0.5)])

# Removed unused imports
# import ...

# Improved code formatting
# Consistent indentation and spacing