def from_dict(cls, obj: dict) -> SampleMetaData:
        """Create an instance of SampleMetaData from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return SampleMetaData.parse_obj(obj)

        # raise errors for additional fields in the input
        for _key in obj.keys():
            if _key not in cls.__properties:
                raise ValueError("Error due to additional fields (not defined in SampleMetaData) in the input: " + str(obj))

        _obj = SampleMetaData.parse_obj({
            "custom": obj.get("custom"),
            "dynamic": obj.get("dynamic"),
            "sharpness": obj.get("sharpness"),
            "luminance": obj.get("luminance"),
            "size_in_bytes": obj.get("sizeInBytes"),
            "snr": obj.get("snr"),
            "uniform_row_ratio": obj.get("uniformRowRatio"),
            "mean": obj.get("mean"),
            "shape": obj.get("shape"),
            "std": obj.get("std"),
            "sum_of_squares": obj.get("sumOfSquares"),
            "sum_of_values": obj.get("sumOfValues")
        })
        return _obj
Create an instance of SampleMetaData from a dict
lightly/openapi_generated/swagger_client/models/sample_meta_data.py