code: def test_stream_serializes_all_args_are_set():
      ppl = slc.Stream(
          [
              slt.Rotate(
                  angle_range=(-106, 90), p=0.7, interpolation="nearest"
              ),
              slt.Rotate(
                  angle_range=(-106, 90), p=0.7, interpolation="nearest"
              ),
              slt.Rotate(
                  angle_range=(-106, 90), p=0.7, interpolation="nearest"
              ),
              slt.Projection(
                  slc.Stream(
                      [
                          slt.Rotate(
                              angle_range=(-6, 90),
                              p=0.2,
                              padding="r",
                              interpolation="nearest",
                          ),
                      ]
                  )
              ),
          ]
      )
  
      serialized = ppl.to_dict()
      assert "interpolation" in serialized
      assert "padding" in serialized
      assert "optimize_stack" in serialized
      assert "transforms" in serialized
      assert len(serialized) == 5
  
      trfs = serialized["transforms"]
      for i, el in enumerate(trfs):
          t = list(el.keys())[0]
          if i < len(trfs) - 1:
              assert list(el.keys())[0] == "rotate"
              assert trfs[i][t]["p"] == 0.7
              assert trfs[i][t]["interpolation"] == (
                  "nearest",
                  "inherit",
              )
              assert trfs[i][t]["padding"] == ("z", "inherit")
              assert trfs[i][t]["angle_range"] == (-106, 90)
          else:
              assert t == "projection"
              assert (
                  trfs[i][t]["affine_transforms"]["stream"][
                      "transforms"
                  ][0]["rotate"]["p"]
                  == 0.2
              )
              assert trfs[i][t]["affine_transforms"]["stream"][
                  "transforms"
              ][0]["rotate"]["interpolation"] == (
                  "nearest",
                  "inherit",
              )
              assert trfs[i][t]["affine_transforms"]["stream"][
                  "transforms"
              ][0]["rotate"]["padding"] == ("r", "inherit")
              assert trfs[i][t]["affine_transforms"]["stream"][
                  "transforms"
              ][0]["rotate"]["angle_range"] == (-6, 90)
  
file_path: solt/tests/test_utils.py
imports: import solt.utils
  import solt.transforms
  import solt.core
  import pytest
  import json
  import pathlib
  import yaml
label_desc: Use image node_id 8 for calling a global function with example usage: test_stream_serializes_all_args_are_set() without return types