def bytes(bits=None, kilobytes=None, megabytes=None, gigabytes=None,
    terabytes=None, petabytes=None):
    """Usage: Convert to bytes. Example: bytes(gigabytes=2)"""
    if bits is not None:
        return bits / 8
    elif kilobytes is not None:
        return kilobytes * 1000
    elif megabytes is not None:
        return megabytes * 1000000.0
    elif gigabytes is not None:
        return gigabytes * 1000000000.0
    elif terabytes is not None:
        return terabytes * 1000000000000.0
    elif petabytes is not None:
        return petabytes * 1000000000000000.0
    else:
        raise Exception(
            'You must specify one value. Example: bits, kilobytes, megabytes, gigabytes, terabytes, petabytes'
            )
