code: def test__gather_distributed_dist_not_available(
      self, mocker: MockerFixture
  ) -> None:
      mock_is_available = mocker.patch.object(
          dist, "is_available", return_value=False
      )
      with pytest.raises(ValueError):
          BarlowTwinsLoss(gather_distributed=True)
      mock_is_available.assert_called_once()
  
file_path: lightly/tests/loss/test_barlow_twins_loss.py
imports: import pytest
  import torch
  import torch.nn
  from pytest_mock import MockerFixture
  from torch import distributed
  from lightly.loss.barlow_twins_loss import BarlowTwinsLoss
label_desc: Use image node_id 2 for calling the TestBarlowTwinsLoss obj's underlying member method code with example usage: obj.test__gather_distributed_dist_not_available(mocker) without return types