def get_size(shard):
    """Get the size of a shard.

    Args:
        shard: A file like object representing the shard.

    Returns: The shard size in bytes.
    """
    shard.seek(0, 2)
    return shard.tell()