code: def test_infer_parquet_types(tmpdir):
      """Test type inference works properly for a parquet file with unconventional types types."""
      # Create a temporary directory to store the parquet file
      tmpdir = str(tmpdir)
  
      # Create a dataframe with all the types
      df = pd.DataFrame(
          {
              "int": [1, 2, 3],
              "float": [1.1, 2.2, 3.3],
              "string": ["a", "b", "c"],
              "datetime": pd.date_range("20130101", periods=3),
              "category": pd.Series(["a", "b", "c"], dtype="category"),
              "bool": [True, False, True],
          }
      )
      df = repeat(df, 10)
      df["float"] = df["float"].apply(Decimal)
      df["date"] = df["datetime"].apply(str)
  
      # Write the dataframe to parquet and read it back
      dataset_path = os.path.join(tmpdir, "dataset.parquet")
      df.to_parquet(dataset_path)
      df = pd.read_parquet(dataset_path)
  
      # Test type inference
      ds = DataframeSource(df)
      ds_info = get_dataset_info_from_source(ds)
      metas = get_field_metadata(
          ds_info.fields, ds_info.row_count, targets=["bool"]
      )
  
      config = yaml.safe_load(
          """
          input_features:
              - name: int
                type: category
              - name: float
                type: number
              - name: string
                type: category
              - name: datetime
                type: date
              - name: category
                type: category
              - name: date
                type: date
          output_features:
              - name: bool
                type: binary
          combiner:
              type: concat
              output_size: 14
          trainer:
              epochs: 2
              batch_size: 8
          """
      )
  
      meta_dict = {meta.config.name: meta for meta in metas}
      for feature in (
          config["input_features"] + config["output_features"]
      ):
          meta = meta_dict[feature["name"]]
          assert (
              feature["type"] == meta.config.type
          ), f"{feature['name']}: {feature['type']} != {meta.config.type}"
  
file_path: ludwig/tests/ludwig/automl/test_base_config.py
imports: import os
  from decimal import Decimal
  import numpy
  import pandas
  import pytest
  import yaml
  from ludwig.automl.base_config import get_dataset_info, get_dataset_info_from_source, get_field_metadata, get_reference_configs, is_field_boolean
  from ludwig.data.dataframe.dask import DaskEngine
  from ludwig.data.dataframe.pandas import PandasEngine
  from ludwig.schema.model_types.base import ModelConfig
  from ludwig.utils.automl.data_source import DataframeSource, wrap_data_source
label_desc: Use image node_id 7 for calling a global function with example usage: test_infer_parquet_types(tmpdir) without return types