code: def test_assert_bfloat16_tensor_serializer():
      serializer = TensorSerializer()
      tensor = torch.ones((10,), dtype=torch.bfloat16)
      with pytest.raises(
          TypeError, match="Got unsupported ScalarType BFloat16"
      ):
          serializer.serialize(tensor)
  
file_path: pytorch-lightning/tests/tests_data/streaming/test_serializer.py
imports: import os
  import sys
  from time import time
  import numpy
  import pytest
  import torch
  from lightning import seed_everything
  from lightning.data.streaming.serializers import _AV_AVAILABLE, _NUMPY_DTYPES_MAPPING, _SERIALIZERS, _TORCH_DTYPES_MAPPING, _TORCH_VISION_AVAILABLE, IntSerializer, NoHeaderNumpySerializer, NoHeaderTensorSerializer, NumpySerializer, PickleSerializer, PILSerializer, TensorSerializer, VideoSerializer
  from lightning_utilities.core.imports import RequirementCache
label_desc: Use image node_id 6 for calling a global function with example usage: test_assert_bfloat16_tensor_serializer() without return types