| n | class MixNamespace: | n | class Mix: | 
            |  |  |  |  | 
            |  | def __init__(self, **kwargs): |  | def __init__(self, **kwargs): | 
            |  | self.__dict__.update(kwargs) |  | self.__dict__.update(kwargs) | 
            |  |  |  |  | 
            |  | def __str__(self): |  | def __str__(self): | 
            | n | fields = sorted(((key, value) for key, value in self.__dict__.it | n | items = sorted(((k, v) for k, v in self.__dict__.items() if not | 
            |  | ems() if not key.startswith('_'))) |  | k.startswith('_'))) | 
            |  | return ', '.join((f'{key}={value}' for key, value in fields)) |  | return ', '.join((f'{k}={v}' for k, v in items)) | 
            |  |  |  |  | 
            |  | def mix(*args): |  | def mix(*args): | 
            | n | combined_fields = {} | n | combined = {} | 
            |  | for obj in args: |  | for obj in args: | 
            | t | for name in dir(obj): | t | for key in dir(obj): | 
            |  | if not name.startswith('_') and (not callable(getattr(obj, n |  | if not key.startswith('_') and (not callable(getattr(obj, ke | 
            |  | ame))): |  | y))): | 
            |  | combined_fields[name] = getattr(obj, name) |  | combined[key] = getattr(obj, key) | 
            |  | return MixNamespace(**combined_fields) |  | return Mix(**combined) |