def _get_datachain_schema(schema: "pa.Schema") -> Optional[SignalSchema]:
    """Return a restored SignalSchema from parquet metadata, if any is found."""
    if schema.metadata and DATACHAIN_SIGNAL_SCHEMA_PARQUET_KEY in schema.metadata:
        serialized_signal_schema = orjson.loads(
            schema.metadata[DATACHAIN_SIGNAL_SCHEMA_PARQUET_KEY]
        )
        return SignalSchema.deserialize(serialized_signal_schema)
    return None
Return a restored SignalSchema from parquet metadata, if any is found.
src/datachain/lib/arrow.py