def __init__(self, *args, order=None, **kwargs):
        """
        Instantiate like a dict, with the exception of kwarg ``order``, which specifies the instance's default dimension
        ordering.

        If the class has no ``default_order`` and no ``order`` kwarg is given, order will be set as reverse
        lexicographic.

        If the class has a ``default_order`` or an ``order`` kwarg is given, a sequence or *args of values
        can also be used, if the length matches the length of the order.
        """
        try:
            d = dict(*args, **kwargs)
            super().__init__(d)
        except TypeError as e:
            keys = order or self.default_order
            if keys is None:
                raise TypeError('Cannot parse arguments with no order') from e

            if len(args) == len(keys):
                values = args
            elif len(args[0]) == len(keys):
                values = args[0]
            else:
                raise TypeError('args do not match length of `order`') from e

            d = dict(zip(keys, values), **kwargs)
            super().__init__(d)

        self._order = order
        self._validate()
def __init__ ( self , * args , order = None , ** kwargs ) : try : d = dict ( * args , ** kwargs ) super ( ) . __init__ ( d ) except TypeError as e : keys = order or self . default_order if keys is None : raise TypeError ( 'Cannot parse arguments with no order' ) from e if len ( args ) == len ( keys ) : values = args elif len ( args [ 0 ] ) == len ( keys ) : values = args [ 0 ] else : raise TypeError ( 'args do not match length of `order`' ) from e d = dict ( zip ( keys , values ) , ** kwargs ) super ( ) . __init__ ( d ) self . _order = order self . _validate ( )
Instantiate like a dict, with the exception of kwarg ``order``, which specifies the instance's default dimension
        ordering.

        If the class has no ``default_order`` and no ``order`` kwarg is given, order will be set as reverse
        lexicographic.

        If the class has a ``default_order`` or an ``order`` kwarg is given, a sequence or *args of values
        can also be used, if the length matches the length of the order.