def to_bytes(size, power=1024, sep=' '):
    """Converts human size to raw bytes."""
    if not size:
        return 0
    size, suffix = size.split(sep, 1)
    suffix = suffix[0]
    try:
        factor = {'K': power, 'M': power ** 2, 'G': power ** 3, 'T': power **
            4, 'P': power ** 5}[suffix]
    except KeyError:
        factor = 1
    return int(float(size) * factor)
