from datetime import datetime
from marshmallow import fields


class MyDateTimeField(fields.DateTime):

    def _deserialize(self, value, attr, data):
        if isinstance(value, datetime):
            return value
        return super()._deserialize(value, attr, data)

a5428500666048af0eec366e12bad2c1bab45a06
<mask token>

<mask token>


class MyDateTimeField(fields.DateTime):
    <mask token>

<mask token>


class MyDateTimeField(fields.DateTime):

    def _deserialize(self, value, attr, data):
        if isinstance(value, datetime):
            return value
        return super()._deserialize(value, attr, data)

from datetime import datetime
from marshmallow import fields


class MyDateTimeField(fields.DateTime):

    def _deserialize(self, value, attr, data):
        if isinstance(value, datetime):
            return value
        return super()._deserialize(value, attr, data)
