def split_seconds(total_seconds, days=False, integer=None):
    """[summary]
    Args:
        total_seconds (int or float): total number of seconds.
        days (bool, optional): If true, it will return a 4-length tuple,
            including the days. Defaults to False.
        integer (bool or None, optional): If True, the seconds returned
            will be an integer. If False, no conversion will be made. If
            None and the remaining seconds are 0, it will return the
            seconds (0) as an int, regardless that it was int or float.
            Defaults to None.
    Returns:
        tuple: 3-length tuple: (hours, seconds, minutes). If days is True,
        it will be a 4-length tuple: (days, hours, seconds, minutes).
    """

    total_minutes = total_seconds // 60
    seconds = total_seconds % 60
    hours = int(total_minutes // 60)
    minutes = int(total_minutes % 60)

    seconds = round(seconds, 2)

    if integer is True:
        seconds = round(seconds, 0)
    elif integer is None:
        if seconds == int(seconds):
            seconds = int(seconds)

    if not days:
        return hours, minutes, seconds

    days = hours // 24
    hours = hours % 24
    return days, hours, minutes, seconds