code: def test_transformer_dtypes_casting(dtype_in, dtype_out):
      X = Xdigits[:100].astype(dtype_in)
      rbm = BernoulliRBM(
          n_components=16, batch_size=5, n_iter=5, random_state=42
      )
      Xt = rbm.fit_transform(X)
  
      # dtype_in and dtype_out should be consistent
      assert (
          Xt.dtype == dtype_out
      ), "transform dtype: {} - original dtype: {}".format(
          Xt.dtype, X.dtype
      )
  
imports: import re
  import sys
  from io import StringIO
  import numpy
  import pytest
  from sklearn.datasets import load_digits
  from sklearn.neural_network import BernoulliRBM
  from sklearn.utils._testing import assert_allclose, assert_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, LIL_CONTAINERS
  from sklearn.utils.validation import assert_all_finite
label_desc: Use image node_id 12 for calling a global function with example usage: test_transformer_dtypes_casting(dtype_in, dtype_out) without return types