code: def test_decimal_friendly_collate_input_has_decimals_in_dictionary():
      desired = {
          "decimal": [Decimal("1.0"), Decimal("1.1")],
          "int": [1, 2],
      }
      input_batch = [
          {"decimal": Decimal("1.0"), "int": 1},
          {"decimal": Decimal("1.1"), "int": 2},
      ]
      actual = decimal_friendly_collate(input_batch)
  
      assert len(actual) == 2
      assert desired["decimal"] == actual["decimal"]
      np.testing.assert_equal(desired["int"], actual["int"].numpy())
  
imports: from decimal import Decimal
  from packaging import version
  import numpy
  import pyarrow
  import pytest
  import torch
  from petastorm import make_reader, TransformSpec, make_batch_reader
  from petastorm.pytorch import _sanitize_pytorch_types, DataLoader, BatchedDataLoader, decimal_friendly_collate, InMemBatchedDataLoader, _load_rows_into_mem
  from petastorm.tests.test_common import TestSchema
label_desc: Use image node_id 8 for calling a global function with example usage: test_decimal_friendly_collate_input_has_decimals_in_dictionary() without return types