<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_ignores(self, folder, *patterns):
 """ Applies ``patterns`` to ``folder``'s ``.stignore`` file. Args: folder (str):
 patterns (str):
 Returns: dict """

        if not patterns:
            return {}
        data = {'ignore': list(patterns)}
        return self.post('ignores', params={'folder': folder}, data=data)