this function returns the modemode as in the measures of central tendency of the input data the input list may contain any datastructure or any datatype mode2 3 4 5 3 4 2 5 2 2 4 2 2 2 2 mode3 4 5 3 4 2 5 2 2 4 4 2 2 2 2 mode3 4 5 3 4 2 5 2 2 4 4 4 2 2 4 2 2 4 modex y y z y modex x y y z x y gets values of modes this function returns the mode mode as in the measures of central tendency of the input data the input list may contain any datastructure or any datatype mode 2 3 4 5 3 4 2 5 2 2 4 2 2 2 2 mode 3 4 5 3 4 2 5 2 2 4 4 2 2 2 2 mode 3 4 5 3 4 2 5 2 2 4 4 4 2 2 4 2 2 4 mode x y y z y mode x x y y z x y gets the maximum count in the input list gets values of modes
from typing import Any


def mode(input_list: list) -> list[Any]:
    
    if not input_list:
        return []
    result = [input_list.count(value) for value in input_list]
    y = max(result)  
    
    return sorted({input_list[i] for i, value in enumerate(result) if value == y})


if __name__ == "__main__":
    import doctest

    doctest.testmod()