def bandwidth_converter(
    number, *, from_unit, to_unit, from_time="seconds", to_time="seconds"
):
    """
    Bandwidth Calculator.

    Convert data rate from one unit to another.

    Arguments:
        number     (int): number to be converted

    Keyword arguments:
        from_unit  (str): convert from this data unit. Example:
                          (bps, Kbps, Mbps, Gbps... KB, KiB, MB, MiB...)
        to_unit    (str): convert to this data unit. Example:
                          (bps, Kbps, Mbps, Gbps... KB, KiB, MB, MiB...)

    Keyword arguments (opt):
        from_time  (str): Specify the time frame used in from_unit
                          (seconds, minutes, hours, days, months)
                          default: seconds
        to_time    (str): Specify the time frame used in to_unit
                          (seconds, minutes, hours, days, months)
                          default: seconds

    bps, Kbps, Mbps, Gbps... = decimal base = 1000^n
    KB, MB, GB, TB...        = decimal base = 1000^n
    KiB, MiB, GiB, TiB...    = binary base  = 1024^n

    References:
        - https://en.wikipedia.org/wiki/Units_of_information
        - https://physics.nist.gov/cuu/Units/binary.html

    Returns: tuple
       (number_converted, to_unit/to_time)

    Example:
    >>> bandwidth_converter(100, from_unit="Mbps", to_unit="MB")
    (12.5, 'MB/seconds')
    >>> bandwidth_converter(100, from_unit="Mbps", to_unit="GB", to_time="hours")
    (45.0, 'GB/hours')
    >>> bandwidth_converter(1, from_unit="Gbps", to_unit="MB")
    (125.0, 'MB/seconds')
    >>> bandwidth_converter(10, from_unit="Gbps", to_unit="GB")
    (1.25, 'GB/seconds')
    >>> bandwidth_converter(10, from_unit="Gbps", to_unit="TB", to_time="hours")
    (4.5, 'TB/hours')
    >>> bandwidth_converter(10, from_unit="GB", to_unit="Gbps")
    (80.0, 'Gbps/seconds')
    >>> Convert 2.25 GB per hours to Mbps # doctest: +SKIP
    >>> bandwidth_converter(2.25, from_unit="GB", from_time="hours", to_unit="Mbps", to_time="seconds") # noqa
    (5.0, 'Mbps/seconds')
    """
    unit_power = {
        "bps": 1,
        "Kbps": 1000,
        "Mbps": 1000 ** 2,
        "Gbps": 1000 ** 3,
        "Tbps": 1000 ** 4,
        "Pbps": 1000 ** 5,
        "Ebps": 1000 ** 6,
        "Bytes": 1,
        "KB": 1000,
        "MB": 1000 ** 2,
        "GB": 1000 ** 3,
        "TB": 1000 ** 4,
        "PB": 1000 ** 5,
        "EB": 1000 ** 6,
        "KiB": 1024,
        "MiB": 1024 ** 2,
        "GiB": 1024 ** 3,
        "TiB": 1024 ** 4,
        "PiB": 1024 ** 5,
        "EiB": 1024 ** 6,
    }

    time_in_sec = {
        "seconds": 1,
        "minutes": 60,
        "hours": 3600,
        "days": 3600 * 24,
        "months": 3600 * 24 * 30,
    }

    if from_unit not in unit_power or to_unit not in unit_power:
        raise ValueError(
            "invalid unit. It must be {}".format(", ".join(unit_power.keys()))
        )

    if from_time not in time_in_sec or to_time not in time_in_sec:
        raise ValueError(
            "invalid time. It must be {}".format(", ".join(time_in_sec.keys()))
        )

    # Convert input number to bps
    bps = (float(number) * int(unit_power[from_unit])) / time_in_sec[from_time]
    if not from_unit.endswith("bps"):
        bps = bps * 8

    # to_unit is bits or bytes
    new_unit = bps if to_unit.endswith("bps") else bps / 8
    # Convert to new unit
    new_unit = (new_unit / unit_power[to_unit]) * time_in_sec[to_time]

    return new_unit, "{}/{}".format(to_unit, to_time)