def str_to_seconds(string):
    """Pocesses a string including time units into a float in seconds.

    Args:
        string (str): Input string, including units.

    Returns:
        float: The processed time in seconds.

    Examples:
        >>> int(round(str_to_seconds('1')))
        1
        >>> int(round(str_to_seconds('1s')))
        1
        >>> int(round(str_to_seconds('2m')))
        120
        >>> int(round(str_to_seconds('3h')))
        10800
        >>> int(round(str_to_seconds('2d')))
        172800

    """
    if isinstance(string, str):
        multipliers = {"s": 1.0, "m": 60.0, "h": 60.0 ** 2.0, "d": 24.0 * 60 ** 2.0}
        for key, multiplier in zip(multipliers, list(multipliers.values())):
            if key in string:
                return float(string.strip(key)) * multiplier
    return float(string)