def _response_schema(method):
    # parse the return schema
    metadata = inspect.signature(method)
    instance = method.__self__ if hasattr(method, '__self__') else None
    if metadata.return_annotation is not metadata.empty:
        argtype = _parse_arg(instance, metadata.return_annotation)
        if argtype in 'type':
            if argtype['type'] in {'list', 'object'}:
                return argtype
            else:
                return {
                    "type": "object",
                    "properties": {
                        "_": argtype
                    }
                }
        elif "$ref" in argtype:
            coll = Reference(argtype['$ref'])
            return coll.get_collection().schema
        else:
            return {
                "type": "object",
                "properties": {
                    "_": argtype
                }
            }
    else:
        return {"type": "object", "description": "no return value."}
dataset/ETHPy150Open JeffHeard/sondra/sondra/decorators.py/_response_schema/swapped operands of `in`