@classmethod
    def deserialize(cls, data):
        if not data:
            return None

        kwargs = {}

        # extract values that we care about
        for field in cls._meta.fields:
            name = field.name
            val = data.get(field.name, None)

            # handle relations
            if val or field.rel:
                val = deserialize_instance(field.rel.to, val)

            kwargs[name] = val

        return cls(**kwargs)
dataset/ETHPy150Open caffeinehit/django-oauth2-provider/provider/oauth2/models.py/Client.deserialize/operator `and` -> `or`