code: def test_fsdp_precision_scaler_with_bf16():
      with pytest.raises(
          ValueError,
          match="`precision='bf16-mixed'` does not use a scaler",
      ):
          FSDPPrecision(precision="bf16-mixed", scaler=Mock())
  
      precision = FSDPPrecision(precision="bf16-mixed")
      assert precision.scaler is None
  
file_path: pytorch-lightning/tests/tests_fabric/plugins/precision/test_fsdp.py
imports: from unittest.mock import Mock
  import pytest
  import torch
  from lightning.fabric.plugins import FSDPPrecision
  from lightning.fabric.plugins.precision.utils import _DtypeContextManager
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_fsdp_precision_scaler_with_bf16() without return types