[docs] [issue15029] doc: Update Defining New Types chapter according to PEP 253