Implement a function that computes the maximum possible value derived from a list of integers representing slimes. The function determines the maximum last slime value based on the presence of positive and negative integers in the list, as detailed in the provided implementation.
Input/Output Requirements
Function Signature: def max_last_slime_value(slimes: List[int]) -> int:
Input:
A list of integers slimes, where each integer represents a slime value. The list can contain positive, negative, and zero values.
The length of the list will be at least 1.
Output:
Returns an integer, which is the maximum last slime value calculated based on the rules defined in the implementation.
Implementation
Create a file named /app/solution.py.
Within this file, implement the function max_last_slime_value as described in the provided implementation.
Ensure that the function handles different cases of the input list according to the conditions specified.
Conditions to Consider
If the list contains only one slime, return that slime's value.
If the list contains both positive and negative slimes, return the sum of the absolute values of all slimes.
If the list contains only negative slimes, return the sum of the absolute values plus double the maximum slime value (which will be the least negative).
If the list contains only positive slimes, return the sum of the absolute values minus double the minimum slime value (which will be the least positive).
Handle edge cases as necessary to ensure robustness.
Make sure to include appropriate comments in your code for clarity.