<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_properties(self, node):
 """ return a dict of all the properties of a given BeautifulSoup node found by applying the css style. """

        ret = {}
        # Try all the rules one by one
        for rule in self.rules:
            if rule.selector(node):
                ret.update(rule.properties)
        # Also search for direct 'style' arguments in the html doc
        for style_node in node.findParents(attrs={'style': True}):
            style = style_node.get('style')
            properties = self.parse_declarations(style)
            ret.update(properties)
        return ret