def configure_mock(self, **kwargs):
for arg, val in sorted(kwargs.items(),<EOL>key=lambda entry: entry[<NUM_LIT:0>].count('<STR_LIT:.>')):<EOL><INDENT>args = arg.split('<STR_LIT:.>')<EOL>final = args.pop()<EOL>obj = self<EOL>for entry in args:<EOL><INDENT>obj = getattr(obj, entry)<EOL><DEDENT>setattr(obj, final, val)<EOL><DEDENT>
Set attributes on the mock through keyword arguments.

        Attributes plus return values and side effects can be set on child
        mocks using standard dot notation and unpacking a dictionary in the
        method call:

        >>> attrs = {'method.return_value': 3, 'other.side_effect': KeyError}
        >>> mock.configure_mock(**attrs)