<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_key_value_dict_by_selectors( self, key_selector, value_selector, value_sub_selector=None ):
 """Return a dictionary of key value data."""

        key_nodes = self.parsedpage.get_nodes_by_selector(key_selector)
        keys = [
            self.parsedpage.get_text_from_node(node)
            for node in key_nodes
        ]

        value_nodes = self.parsedpage.get_nodes_by_selector(value_selector)
        if value_sub_selector is not None:
            vals = [
                [
                    self.parsedpage.get_text_from_node(subnode)
                    for subnode in node.find(value_sub_selector)
                ]
                for node in value_nodes.items()
            ]
        else:
            vals = [
                self.parsedpage.get_text_from_node(node)
                for node in value_nodes
            ]

        return dict(zip(keys, vals))