<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_filter_events( self, contract_address: Address, topics: List[str] = None, from_block: BlockSpecification = 0, to_block: BlockSpecification = 'latest', ) -> List[Dict]: """ Get events for the given query. """

        logs_blocks_sanity_check(from_block, to_block)
        return self.web3.eth.getLogs({
            'fromBlock': from_block,
            'toBlock': to_block,
            'address': to_checksum_address(contract_address),
            'topics': topics,
        })