def get_max_value(obj_in):
    """
    Returns the maximum allowed value for a specific object type.
    :param obj_in: Object
    :return int: Maximum value of object type
    """
    if obj_in.dtype == 'uint8':
        return 255
    else:
        return 2 ** int(str(obj_in.dtype)[-2:]) - 1
