code: def test_decimal_roundtrip(tempdir):
      num_values = 10
  
      columns = {}
      for precision in range(1, 39):
          for scale in range(0, precision + 1):
              with util.random_seed(0):
                  random_decimal_values = [
                      util.randdecimal(precision, scale)
                      for _ in range(num_values)
                  ]
              column_name = "dec_precision_{:d}_scale_{:d}".format(
                  precision, scale
              )
              columns[column_name] = random_decimal_values
  
      expected = pd.DataFrame(columns)
      filename = tempdir / "decimals.parquet"
      string_filename = str(filename)
      table = pa.Table.from_pandas(expected)
      _write_table(table, string_filename)
      result_table = _read_table(string_filename)
      result = result_table.to_pandas()
      tm.assert_frame_equal(result, expected)
  
imports: import decimal
  import io
  import numpy
  import pytest
  import pyarrow
  from pyarrow.tests import util
  from pyarrow.tests.parquet.common import _check_roundtrip
label_desc: Use image node_id 7 for calling a global function with example usage: test_decimal_roundtrip(tempdir) without return types