{{ schema.doc.strip() | format_github_markdown }}
{% set type_vars = {} %}
{% if schema.inputs or schema.attributes %}

Parameters
==========
{% for param in schema.inputs %}
    {% if param.type_str[0] is upper %}
        {% do type_vars.update({param.type_str: param.types}) %}
    {% endif %}
{{ param.name }}
{% filter indent(width=4) %}
    Type {{ param.type_str }}.
{{ param.description | format_github_markdown }}
{% endfilter %}
{% endfor %}
{% for attr in attributes %}
{{ attr.name }}
{% filter indent(width=4) %}
    Attribute.
{{ attr.description | format_github_markdown }}
{% endfilter %}
{% endfor %}
{% if schema.outputs and is_variadic(schema.outputs[-1]) and not out_variadic_solution %}
{{ schema.outputs[-1].name }}_count
    Specifies the number of variadic outputs of this operator.
    Non-standard parameter created by the opset generator, as inference (a solution) it was not implemented or is impossible.
{% endif %}
{% for attr in attributes %}
    {% if (attr.attr_constructor == 'AttrGraph') and (attr.subgraph_solution is none) %}
{{ attr.name }}_input_types: Iterable[Type]
    Specifies the input types for the subgraph ``{{ attr.name }}``.
    Non-standard parameter created by the opset generator, as constructing a graph without this information is not implemented or impossible.
    {% endif %}
{% endfor %}
{% endif %}
{% if schema.outputs %}

Returns
=======
{% for param in schema.outputs %}
    {% if param.type_str[0] is upper %}
        {% do type_vars.update({param.type_str: param.types}) %}
    {% endif %}
{{ param.name }} : {%
       if is_variadic(param) %}
Sequence[Var]
    {% else %}
Var
    {% endif %}
{% filter indent(width=4) %}
    Type {{ param.type_str }}.
{{ param.description | format_github_markdown }}
{% endfilter %}
{% endfor %}
{% endif %}

Notes
=====
Signature: ``{{ schema.domain or 'ai.onnx' }}@{{ schema.since_version }}::{{ schema.name }}``.

{% if type_vars %}
Type constraints:
{% for var, members in type_vars.items() %}
 - {{ var }}: {% for type in members|sort %}`{{ type }}`{% if not loop.last %}, {% endif %}{% endfor %}

{% endfor %}
{% endif %}
