from hashlib import md5 as _md5


def get_size_and_checksum(data):
    """Calculates the size and md5 of the passed data

       Args:
            data (byte): data to calculate checksum for
        Returns:
            tuple (int,str): size of data and its md5 hash
    """
    md5 = _md5()
    md5.update(data)

    return (len(data), str(md5.hexdigest()))