<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self, file):
 """ Checks a given file against all available yara rules :param file: Path to file :type file:str :returns: Python dictionary containing the results :rtype: list """

        result = []
        for rule in self.ruleset:
            matches = rule.match(file)
            for match in matches:
                result.append(str(match))

        return result