def set_file_priority(self, infohash, file_id, priority):
if priority not in [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:2>, <NUM_LIT:7>]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif not isinstance(file_id, int):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>data = {'<STR_LIT>': infohash.lower(),<EOL>'<STR_LIT:id>': file_id,<EOL>'<STR_LIT>': priority}<EOL>return self._post('<STR_LIT>', data=data)<EOL>
Set file of a torrent to a supplied priority level.

:param infohash: INFO HASH of torrent.
:param file_id: ID of the file to set priority.
:param priority: Priority level of the file.