def get_conversion_table(base_unit: str) -> Dict[str, Dict[str, Union[int, float]]]:
    """Get conversion table for the specified base unit.

    If no conversion table exists for the passed unit, return an empty :class:`OrderedDict`.

    :param base_unit: unit to choose the conversion table for.

    :returns: :class:`OrderedDict` object.
    """
    memory_unit_conversion_table: Dict[str, Dict[str, Union[int, float]]] = OrderedDict([
        ('TB', {'B': 1024**4, 'kB': 1024**3, 'MB': 1024**2}),
        ('GB', {'B': 1024**3, 'kB': 1024**2, 'MB': 1024}),
        ('MB', {'B': 1024**2, 'kB': 1024, 'MB': 1}),
        ('kB', {'B': 1024, 'kB': 1, 'MB': 1024**-1}),
        ('B', {'B': 1, 'kB': 1024**-1, 'MB': 1024**-2})
    ])
    time_unit_conversion_table: Dict[str, Dict[str, Union[int, float]]] = OrderedDict([
        ('d', {'ms': 1000 * 60**2 * 24, 's': 60**2 * 24, 'min': 60 * 24}),
        ('h', {'ms': 1000 * 60**2, 's': 60**2, 'min': 60}),
        ('min', {'ms': 1000 * 60, 's': 60, 'min': 1}),
        ('s', {'ms': 1000, 's': 1, 'min': 60**-1}),
        ('ms', {'ms': 1, 's': 1000**-1, 'min': 1 / (1000 * 60)}),
        ('us', {'ms': 1000**-1, 's': 1000**-2, 'min': 1 / (1000**2 * 60)})
    ])
    if base_unit in ('B', 'kB', 'MB'):
        return memory_unit_conversion_table
    elif base_unit in ('ms', 's', 'min'):
        return time_unit_conversion_table
    return OrderedDict()
Get conversion table for the specified base unit.

    If no conversion table exists for the passed unit, return an empty :class:`OrderedDict`.

    :param base_unit: unit to choose the conversion table for.

    :returns: :class:`OrderedDict` object.
    
patroni/utils.py