code: def test_initialization_float(probs):
      funcs = (
          lambda x: x,
          lambda x: [tuple(x_) for x_ in x],
          lambda x: [numpy.array(x_, dtype=numpy.float32) for x_ in x],
          lambda x: [
              torch.tensor(x_, dtype=torch.float32, requires_grad=False)
              for x_ in x
          ],
          lambda x: [
              torch.nn.Parameter(torch.tensor(x_), requires_grad=False)
              for x_ in x
          ],
      )
  
      for func in funcs:
          y = func(probs)
          _test_initialization(
              ConditionalCategorical(y, inertia=0.0, frozen=False),
              y,
              0.0,
              False,
              torch.float32,
          )
          _test_initialization(
              ConditionalCategorical(y, inertia=0.3, frozen=False),
              y,
              0.3,
              False,
              torch.float32,
          )
          _test_initialization(
              ConditionalCategorical(y, inertia=1.0, frozen=True),
              y,
              1.0,
              True,
              torch.float32,
          )
          _test_initialization(
              ConditionalCategorical(y, inertia=1.0, frozen=False),
              y,
              1.0,
              False,
              torch.float32,
          )
  
      x = [numpy.array(prob, dtype=numpy.float64) for prob in probs]
      _test_initialization(
          ConditionalCategorical(x, inertia=0.0, frozen=False),
          x,
          0.0,
          False,
          torch.float64,
      )
      _test_initialization(
          ConditionalCategorical(x, inertia=0.3, frozen=False),
          x,
          0.3,
          False,
          torch.float64,
      )
      _test_initialization(
          ConditionalCategorical(x, inertia=1.0, frozen=True),
          x,
          1.0,
          True,
          torch.float64,
      )
      _test_initialization(
          ConditionalCategorical(x, inertia=1.0, frozen=False),
          x,
          1.0,
          False,
          torch.float64,
      )
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.distributions import ConditionalCategorical
  from ._utils import _test_initialization_raises_one_parameter
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  from ._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_initialization_float(probs) without return types