def _extract_defs(self, model: 'data.Model', model_cls: type['data.Model'], collection: Literal[('payloads', 'responses')], merge_defs: Literal[('ignore', 'append', 'overwrite')]):
    defs = {}
    for parent in model_cls.__bases__:
        if (issubclass(parent, data.Model) and (parent != data.Model)):
            for (_key, _def) in self._extract_defs(model, parent, collection, merge_defs).items():
                defs[_key] = _def
    def_func = getattr(model_cls, collection)
    if hasattr_(def_func, '__func__'):
        def_func = def_func.__func__
    def_gen = def_func(model)
    if (def_gen is None):
        return defs
    new_defs = list(def_gen)
    for _def in new_defs:
        if isinstance(_def, list):
            model_key = 'default'
            payload = _def
        else:
            (model_key, payload) = _def
        if (model_key in defs):
            if (merge_defs == 'append'):
                for _param in payload:
                    defs[model_key].append(_param)
            elif (merge_defs == 'overwrite'):
                defs[model_key] = payload
        else:
            defs[model_key] = payload
    return defs
def _extract_defs(self, model: 'data.Model', model_cls: type['data.Model'], collection: Literal[('payloads', 'responses')], merge_defs: Literal[('ignore', 'append', 'overwrite')]):
    defs = {}
    for parent in model_cls.__bases__:
        if (issubclass(parent, data.Model) and (parent != data.Model)):
            for (_key, _def) in self._extract_defs(model, parent, collection, merge_defs).items():
                defs[_key] = _def
    def_func = getattr(model_cls, collection)
    if hasattr_(def_func, '__func__'):
        def_func = def_func.__func__
    def_gen = def_func(model)
    if (def_gen is None):
        return defs
    new_defs = list(def_gen)
    for _def in new_defs:
        if isinstance(_def, list):
            model_key = 'default'
            payload = _def
        else:
            (model_key, payload) = _def
        if (model_key in defs):
            if (merge_defs == 'append'):
                for _param in payload:
                    defs[model_key].append(_param)
            elif (merge_defs == 'overwrite'):
                defs[model_key] = payload
        else:
            defs[model_key] = payload
    return defs