def wrap_together(self, LayoutClass, *args, **kwargs):
if isinstance(self.slice, slice):<EOL><INDENT>start = self.slice.start if self.slice.start is not None else <NUM_LIT:0><EOL>self.layout.fields[start] = self.wrapped_object(<EOL>LayoutClass, self.layout.fields[self.slice], *args, **kwargs<EOL>)<EOL>for i in reversed(range(*self.slice.indices(len(self.layout.fields)))):<EOL><INDENT>if i != start:<EOL><INDENT>del self.layout.fields[i]<EOL><DEDENT><DEDENT><DEDENT>elif isinstance(self.slice, list):<EOL><INDENT>raise DynamicError("<STR_LIT>")<EOL><DEDENT>
Wraps all layout objects pointed in `self.slice` together under a `LayoutClass`
instance with `args` and `kwargs` passed.