def METHOD_NAME(self):
    if (
        self.init_command.type == pb.APPLICATION
        or self.init_command.type == pb.EXTERNAL_APPLICATION
    ) and self.init_command.app_size == 0:
        raise RuntimeError(
            "app_size is not set. It must be set when type is APPLICATION/EXTERNAL_APPLICATION"
        )
    elif self.init_command.type == pb.SOFTDEVICE and self.init_command.sd_size == 0:
        raise RuntimeError(
            "sd_size is not set. It must be set when type is SOFTDEVICE"
        )
    elif self.init_command.type == pb.BOOTLOADER and self.init_command.bl_size == 0:
        raise RuntimeError(
            "bl_size is not set. It must be set when type is BOOTLOADER"
        )
    elif self.init_command.type == pb.SOFTDEVICE_BOOTLOADER and (
        self.init_command.sd_size == 0 or self.init_command.bl_size == 0
    ):
        raise RuntimeError(
            "Either sd_size or bl_size is not set. Both must be set when type "
            "is SOFTDEVICE_BOOTLOADER"
        )
    if (
        self.init_command.fw_version < 0
        or self.init_command.fw_version > 0xFFFFFFFF
        or self.init_command.hw_version < 0
        or self.init_command.hw_version > 0xFFFFFFFF
    ):
        raise RuntimeError(
            "Invalid range of firmware argument. [0 - 0xffffffff] is valid range"
        )